The application claims the benefit of Taiwan application serial No. 106104157, filed on Feb. 8, 2017, and the entire contents of which are incorporated herein by reference.
The present invention generally relates to a method for estimating parameters of a direct current (DC) machine, more particularly, to a method for estimating the parameters of the DC machine by the Laplace transform.
The function of the DC machines is to perform conversion between the mechanical energy and the DC electric power under the magnetic field. DC machines have been widely used in automation industry, precision machining industry and other related fields due to the advantages such as easy acquisition of the power (DC power), high starting torque, high acceleration and deceleration torques, as well as the ability to control the rotational speed by merely adjusting the magnitude of the voltage.
For example, in a precision motion system, since the parameters of the motion system have a great influence on the control performance of the motion system itself, it is necessary to ensure that the parameters of the motion system can be accurately identified so as to effectively design the motion system to improve the performance of the motion system. In order to design a DC machine that can accurately identify the parameters of the motion system, the design analysis and research are carried out mostly based on the equivalent model of the DC machine.
Specifically, the models that are often used in the analysis of the DC machine can be divided into two categories, which are transient model and steady-state model. In the transient model, since a DC machine is modeled as a second-order circuit characterized by a second-order differential equation, a zero-input response and a zero-state response are generated when applying a step function input. However, due to the fact that the zero-input response is in the form of an exponential function, the parameters of the DC machine cannot be decomposed and analyzed easily in an operation, leading to poor operational efficiency. Furthermore, the signals of the terminal voltage, the armature current and the rotational speed of the DC machine may be disturbed by the noise due to the commutation of the DC machine. Also, the actual structure of the DC machine is much more complex than the transient model, which in turn causes errors between the estimated parameter values of the transient model and the actual parameter values of the DC machine.
In light of this, it is necessary to improve the operational efficiency, to avoid the noise interference, as well as to reduce the error to meet the actual need of the parameter estimation and to enhance its utility.
It is therefore an objective of this invention to provide a method for estimating the parameters of a DC machine by the Laplace transform, in which the method is capable of simplifying the operational procedure, eliminating the noise interference, and reducing the errors between the estimated parameter values and the actual parameter values of the DC machine.
In an aspect of the invention, a method for estimating the parameters of the direct current machine by Laplace transform as executed by a computer system dedicated to estimating the parameters of the direct current machine is disclosed. The computer system includes a calculation module, a human machine interface, a data retrieval module, a servo driver, a servo motor and the DC machine. The method includes establishing a transient model of the direct current machine by the calculation module. The transient model includes an equivalent circuit and an equivalent mechanism. The equivalent circuit includes an armature resistance, an armature inductance and a back electromotive force constant. The equivalent mechanism includes a moment of inertia and a friction coefficient. The method further includes sampling a terminal voltage, an armature current and a rotational speed of the direct current machine at a plurality of time points by the computer system, quantizing each of the terminal voltage, the armature current and the rotational speed into a discrete value at each of the plurality of time points when the direct current machine is started, generating an estimated value of each of the terminal voltage, the armature current and the rotational speed based on the discrete values of the terminal voltage, the armature current and the rotational speed, and establishing a transfer function based on the transient mode by the calculation module. The transfer function generates a first frequency domain function of the estimated value of the armature current and a second frequency domain function of the estimated value of the rotational speed according to the Laplace transform. The method further includes expressing the first and second frequency domain functions to respectively generate third and fourth frequency domain functions, making the first and third frequency domain functions equal to each other and the second and fourth frequency domain functions equal to each other to generate relational equations of the armature resistance, the armature inductance, the back electromotive force constant, the moment of inertia, and the friction coefficient, obtaining relational equations of the armature resistance, the armature inductance, the back electromotive force constant, the moment of inertia and the friction coefficient by setting the first and third frequency domain functions equal to each other and the second and fourth frequency domain functions equal to each other, as performed by the calculation module, expressing a difference between an actual value of the armature current and the estimated value of the armature current by a first error function to generate coefficients of a polynomial fraction of the third frequency domain function, and a difference between an actual value of the armature current and the estimated value of the armature current by a second error function to generate coefficients of a polynomial fraction of the fourth frequency domain function, generating coefficients of a polynomial fraction of the estimated value of the rotational speed according to a plurality of frequency domain values of the rotational speed and the first error function, adjusting the relational equations according to the coefficients of the polynomial fractions of the third and fourth frequency domain functions, and outputting the estimated values of the armature resistance and the armature inductance, the back electromotive force constant, a value of the moment of inertia and a value of the friction coefficient to the data retrieval module.
In an example, the transfer function is expressed as:
{circumflex over (v)}, î and {circumflex over (ω)} are the terminal voltage, the armature current and the rotational speed, respectively. Ra, La, J and B are the armature resistance, the armature inductance, the moment of inertia and the friction coefficient, respectively. P is a notation for differentiation. K is the back electromotive force constant or a torque constant.
In an example, the first frequency domain function is expressed as:
Î(s) is the estimated value of the armature current, {circumflex over (v)} is the estimated value of the terminal voltage, and s is a complex frequency.
In an example, the third frequency domain function is expressed as:
Î(s) is the estimated value of the armature current after noise is filtered. b1, b2, c0 and c1 are the coefficients of the polynomial fraction of the third frequency domain function. S is a complex frequency.
In an example, the polynomial fraction of the armature current is expressed as:
EI′ is the difference between the actual value of the armature current and the estimated value of the armature current. s1 is a lower limit of the complex frequency, and s2 is an upper limit of the complex frequency.
In an example, a partial derivative of each of the coefficients of the polynomial fraction of the first error function is made zero to obtain the coefficients as:
In an example, the second error function is expressed as:
Ŵ(s) is the estimated value of the rotational speed, {circumflex over (v)} is the estimated value of the terminal voltage, and s is a complex frequency.
In an example, the fourth frequency domain function is expressed as:
Ŵ(s) is the estimated value of the rotational speed after noise is filtered, and b1, b2 and d0 are the coefficients of the polynomial fraction of the fourth frequency domain function.
In an example, the second error function is expressed as:
Ew′ is the difference between the actual value of the rotational speed and the estimated value of the rotational speed. s1 is a lower limit of the complex frequency, and s2 is an upper limit of the complex frequency.
In an example, a partial derivative of each of the coefficients of the polynomial fraction of the second error function is made zero to obtain the coefficients as:
In another aspect, an apparatus for estimating the parameters of the direct current machine by Laplace transform comprises a computer system dedicated to performing the above method for estimating the parameters of the direct current machine by the Laplace transform.
In summary, through expressing the discrete values of the terminal voltage, the armature current and the rotational speed by polynomial regression, the method for estimating parameters of the DC machine by the Laplace transform according to an embodiment of the invention is able to maintain the transient characteristics of the DC machine during the filtering process of the noise. Moreover, the method according to the embodiment of the invention may transform the parameters of the DC machine from the time domain to the frequency domain, effectively reducing the operational complexity. Advantageously, the accuracy and operational efficiency in estimating the parameters of the DC machine can be improved.
The present invention will become more fully understood from the detailed description given hereinafter and the accompanying drawings which are given by way of illustration only, and thus are not limitative of the present invention, and wherein:
Based on the above transient model, the relations of the equivalent circuit can be established. An estimated value of the terminal voltage of the DC machine can be expressed as the following equation (1):
{circumflex over (v)} is the estimated value of the terminal voltage of the DC machine, î is an estimated value of the armature current of the DC machine, Ra is the armature resistance, La is the armature inductance, Ê is an estimated value of a back electromotive force, and dî/dt is the rate of change of the estimated value of the armature current.
In addition, the relation between the estimated value of the back electromotive force (Ê) and an estimated value of the rotational speed of the DC machine can be expressed as the following equation (2):
Ê=K
E{circumflex over (ω)}, (2).
Ê is the estimated value of the back electromotive force, KE is the back electromotive force constant, and {circumflex over (ω)} is the estimated value of the rotational speed.
Therefore, the above equation (1) may be rewritten as the following equation (3):
{circumflex over (v)}, î and {circumflex over (ω)} are the estimated values of the terminal voltage, the armature current and the rotational speed, respectively. Ra, La and KE are the armature resistance, the armature inductance and the back electromotive force constant, respectively. dî/dt is the rate of change of the estimated value of the armature current.
Moreover, when the DC machine has no load, the relations of the equivalent mechanism can be described by the following equations (4) and (5):
T is an estimated value of a torque, J is the moment of inertia, B is the friction coefficient, KT is a torque constant. î and ω are the estimated values of the armature current and the rotational speed, respectively. dŵ/dt is the rate of change of the estimated value of the rotational speed.
Besides, since the back electromotive force constant KE is equal to the torque constant KT, each of the back electromotive force constant KE (in equation (3)) and the torque constant KT (in equation (5)) can be replaced by a parameter K in this embodiment. As a result, based on the relations of the equivalent circuit and the equivalent mechanism of the transient model, a transfer function of the DC machine can be established as:
{circumflex over (v)}, î and {circumflex over (ω)} are the estimated values of the terminal voltage, the armature current and the rotational speed, respectively. Ra, La, J and B are the armature resistance, the armature inductance, the moment of inertia and the friction coefficient, respectively. P is a differential divisor, and K is the back electromotive force constant or the torque constant.
Since the DC machine is modeled as a second-order circuit characterized by a second-order differential equation, a zero-input response and a zero-state response are generated when applying a step function input. However, since the zero-input response is an exponential function which is not easy to decompose and analyze during the operation, the operational efficiency is low. Therefore, the exponential function can be transformed to into a polynomial by Laplace Transform in this embodiment to effectively reduce the operational complexity, improving the operational efficiency.
Specifically, when an input voltage is a step function with a value {circumflex over (V)}, the Laplace transform of the input voltage can be represented as {circumflex over (V)}/S, wherein S is a complex frequency. Thus, the above equation (6) can be transformed from the time domain to the frequency domain by the Laplace transform as shown in the following equation (7):
{circumflex over (V)}, Î and Ŵ are the estimated values of the terminal voltage, the armature current and the rotational speed in the frequency domain, respectively. Ra, La, J and B are the armature resistance, the armature inductance, the moment of inertia and the friction coefficient, respectively. S is the complex frequency and K is the back electromotive force constant or the torque constant.
Thus, a first frequency domain function of the estimated value of the armature current can be obtained based on equations 7a-7h below, and a second frequency domain function of the estimated value of the rotational speed can be obtained based on equations 7i-7k below:
Î(s) and Ŵ(s) are the frequency domain functions of the estimated values of the armature current and the rotational speed. {circumflex over (v)} is the estimated value of the terminal voltage. Ra, La, J and B are the armature resistance, the armature inductance, the moment of inertia and the friction coefficient, respectively. S is the complex frequency and K is the back electromotive force constant or the torque constant.
With reference to
In this embodiment, referring to
The method for estimating the parameters of the DC machine by the Laplace transform according to the embodiment of the invention may include, but is not limited to, a sampling step S1, a transforming step s2, a noise filtering step S3, a parameter calculating step S4 and a parameter outputting step S5.
In the sampling step S1, after the DC machine is started, the data retrieval module 3 of the computer system samples the terminal voltage, the armature current and the rotational speed of the DC machine at different time points. The terminal voltage, the armature current and the rotational speed are respectively quantized into a set of discrete values based on the sampling time. The calculation module 1 of the computer system obtains an estimated value of the terminal voltage from the set of discrete values of the terminal voltage, an estimated value of the armature current from the set of discrete values of the armature current, and an estimated value of the rotational speed from the set of discrete values of the rotational speed. The principle in obtaining the estimated values from the sets of discrete values can be readily appreciated by the skilled person and therefore is not described herein.
The transforming step S2 is configured to respectively transform the estimated values of the terminal voltage, the armature current and the rotational speed from time domain to frequency domain. Namely, the estimated value of each of the terminal voltage, the armature current and the rotational speed is transformed from an exponential function into a polynomial to reduce the operational complexity in the time domain.
In the transforming step S2 of this embodiment, the computer system is able to transform the estimated value of each of the armature current and the rotational speed into a polynomial by the Laplace transform. For example, if a time domain signal is composed of a single exponential component, the exponential component can be expressed as the following equation (10):
x(n)=αe−λn/N,n=0,1, . . . N−1, (10).
x(n) is the time domain value of the exponential component, n is the sampling sequence of the exponential component (e.g., n=1, 2, . . . , N−1), a is a coefficient of the exponential component, e−λn/N is an exponential term of the exponential component, and 1/λ is a time constant.
Moreover, equation (10) can be transformed into a polynomial in the frequency domain by the Laplace transform as follows:
X(s) is the frequency domain value of the exponential component, x(n) is the time domain value of the exponential component, n is the sampling sequence of the exponential component (e.g., n=1, 2, . . . , N−1), e−sn/N is an exponential term, and SiN is a frequency resolution.
According to the above equations (10) and (11), X(s) can be further expressed as:
In the above equation (12), the result of the numerator of the equation (12) is approximately 1 when λ+s>5. The numerator can be derived from the following equation (13):
1−e−(λ+s)|λ+s>5≅1, (13).
In addition, the result of the denominator of the equation (12) is approximately (α+s) when N>>α+S. The denominator can be derived from the following equation (14):
1−e−(λ+s)|λ+s>5≅λ+s/N, (14).
Therefore, according to the above equations (12) and (13), the result of the equation (12) is approximately as:
X(s) is the frequency domain value of the exponential component, α is the coefficient of the exponential component, 1/α is the time constant, S is a lower limit of the complex frequency and S2 is an upper limit of the complex frequency.
However, in the above equation (15), the lower limit S1 must satisfy the condition of the above equation (13) (i.e. λ+s1>5) and the upper limit S2 must satisfy the condition of the above equation (14) (i.e. N>>λ+s2), such that the complex frequency in the interval [S1, S2] can be substituted into the above equation (15). Namely, for the complex frequency in the interval [S1, S2], the estimated values of the armature current and the rotational speed can be respectively transformed into a polynomial by the Laplace transform.
On the other hand, if the time domain signal consists of a plurality of exponential components, the plurality of exponential components can be expressed as the following equation (16):
x′(n) is the time domain value of the sum of the plurality of exponential components, n is the sampling sequence of the plurality of exponential components (e.g., n=1, 2, . . . , N−1), αm is the coefficient of the mth exponential component, e−λ
Moreover, the Laplace transform of the sum of the plurality of exponential components in the above equation (16) is shown in the following equation (17):
X(s) is the frequency domain value of the sum of the plurality of exponential components, αm is the coefficient of the mth exponential component, 1/λm is the time constant for the mth exponential component, S1 is the lower limit of the complex frequency and S2 is the upper limit of the complex frequency.
Since the step response of the DC machine can be expressed as the following equation (18):
x″(n)=α0+α1e−
x″(n) is the time domain value of the sum of the plurality of exponential components, αn is the coefficient of the nth exponential component, n is the sampling sequence of the plurality of exponential components (e.g., n=1, 2), and e−
Therefore, once the Laplace transform is applied, the step response of the DC machine can be expressed as the following equation (19):
X″(s) is the frequency domain value of the sum of the plurality of exponential components, a, is the coefficient of the nth exponential component, S is the complex frequency, and 1/λn is the time constant for the nth exponential component (e.g., n=1, 2).
Furthermore, the above equation (19) may be rewritten as a polynomial fraction as shown in the following equation (20) or (21):
X″(s) is the frequency domain value of the sum of the plurality of exponential components, b1, b2, c0, c1 and d0 are coefficients of the polynomial fractions, and S is the complex frequency.
Since the actual values of the terminal voltage, the armature current and the rotational speed may contain noise due to the commutation of the DC machine, the estimated parameter values of the DC machine as calculated may have a large difference from the actual parameter values of the DC machine. Thus, in this embodiment, the noise filtering step S3 is able to filter the noise from the estimated values of the terminal voltage, the armature current and the rotational speed by polynomial regression. Besides, the noise filtering step S3 is able to maintain the transient characteristics of the DC machine during the filtering process of the noise, so that the estimated values of the DC machine parameter as calculated can be consistent with the actual behavior of the DC machine.
In summary, after the noise is filtered from the above equations (8) using polynomial regression, a third frequency domain function of the estimated value of the filtered armature current can be rewritten as the following equation (22):
Î(s) is a frequency domain function of the estimated value of the armature current in the frequency domain after the filtering of the noise. b1, b2, c0 and c1 are coefficients of the polynomial fraction, and S is the complex frequency.
In order to make the estimated values of the parameters of the DC machine close to the actual values, in this embodiment, the parameter calculating step S4 can minimize the differences between the estimated values and the actual values of the parameters of the DC machine by the following equation (23), allowing the estimated values of the parameters of the DC machine to approach the actual values.
For example, assuming that the actual values of the armature current in the frequency domain is I, then an error function between the actual value and the estimated value of the armature current is expressed as the following equation (23):
E1 is the difference between the actual value and the estimated value of the armature current in the frequency domain, S is the complex frequency, S1 is the lower limit of the complex frequency, S2 is the upper limit of the complex frequency, I(s) is the function of the actual value of the armature current in the frequency domain, and Î(s) is the function of the estimated value of the armature current in the frequency domain after the noise is filtered.
Based on the above equation (22), when the actual value of the armature current is equal to the estimated value of the armature current (the difference between the actual value and the estimated value is 0), since both
and ((s3+b2s2+b1s)I(s)−(c1s+c))2 are zero and have the same solution, the equation (23) can be rewritten as follow:
E1 is the difference between the actual value and the estimated value of the armature current, S is the complex frequency, S1 is the lower limit of the complex frequency, S2 is the upper limit of the complex frequency, I(s) is the function of the actual value of the armature current in the frequency domain, and b1, b2, c0 and c1 are the coefficients of the polynomial fraction.
Besides, the partial derivative of each of the coefficients of the polynomial fraction in the error function is made zero, the coefficients of the polynomial fraction can be derived from the following equations (25), (26), (27) and (28):
In view of the foregoing, the above equations (25), (26), (27) and (28) can be rewritten as the following equation (29):
b1, b2, c0 and c1 are the coefficients of the polynomial fraction in the equation (22).
Based on the equations (8) and (22), b1, b2, c0 and c1 are
respectively.
In addition, according to the above equations (9), a fourth frequency domain function of the estimated value of the filtered rotational speed can be rewritten as:
Ŵ(s) is the estimated value of the rotational speed in the frequency domain after the noise is filtered, b1, b2 and d0 are coefficients of the polynomial fraction, and S is the complex frequency.
For example, assume an actual value of the rotational speed in the frequency domain is W. In this case, an error function between the actual value W and an estimated value Ŵ can be expressed as:
EW is the difference between the actual value and the estimated value of the rotational speed, S is the complex frequency, S1 is a lower limit of the complex frequency, and S2 is an upper limit of the complex frequency. W(s) is the actual value of the rotational speed in the frequency domain. Ŵ(s) is the estimated value of the rotational speed in the frequency domain.
Based on the above, when the actual value of the armature current is equal to the estimated value of the armature current in the frequency domain (the difference between the actual value and the estimated value is 0), since both
and ((s3+b2s2+b1s)W(s)−d0))2 are zero and have the same solution, the equation (30) can be introduced into equation (31) to obtain equation (32) below:
Ew′ is the difference between the actual value and the estimated value of the rotational speed in the frequency domain, S is the complex frequency, S1 is a lower limit of the complex frequency, S2 is an upper limit of the complex frequency, W(s) is the actual value of the rotational speed in the frequency domain, and b1, b2 and d0 are coefficients of the polynomial fraction.
Based on equations (22) and (30), since the armature current and the rotational speed are the signals from the transient model, their characteristic roots would be the same. Therefore, equations (30) and (22) have the same denominators whose efficiencies are already obtained from equation (29). As a result, the partial derivatives of the coefficients of the polynomial fraction in the error function are set as zero. The coefficients of the polynomial fraction are calculated as follows:
The equation (33) can be derived as equation (34) below:
The coefficient d0 can be derived from equations (9) and (30) as
Based on the above, since the coefficients c0 and c1 of the polynomial fraction are
respectively, it can be derived that La={circumflex over (v)}/c1 and
In addition, the coefficients b1 and b2 of the polynomial fraction are
respectively. Therefore, it can be derived that
Furthermore, since d0 is
it can be derived that
Based on the above, the parameters of the DC machine can be expressed as equations (35)-(39).
The parameter outputting step S5 may output the estimated values of the parameters of the DC machine by the computer system. In this embodiment, the estimated values of the DC machine include the armature resistance Ra, the armature inductance La, the back electromotive force constant (KE), the moment of inertia (J) and the friction coefficient (B).
In order to verify the processing capability against the noise of the present invention, and to evaluate the accuracy and reliability under the practical applications, a DC machine (e.g., the one with the power of 150 W) is provided as an example to verify and evaluate the present invention.
The following Table 1 is the estimated results of the parameters of the DC machine.
In addition, by using a programming language (such as C++, Java, etc.), the method for estimating the parameters of the DC machine by the Laplace transform according to the above embodiment of the invention can be implemented as a computer program (such as a DC machine parameter estimation program for determining whether the estimated values of the DC machine parameter are consistent with the actual behavior of the DC machine). The coding method of the computer program can be understood by a person skilled in the art. The program code can be utilized to produce a program product with a built-in computer program. Based on this, when the computer system loads and executes the computer program, the method according to the above embodiment of the invention can be performed.
In summary, through expressing the discrete values of the terminal voltage, the armature current and the rotational speed by polynomial regression, the method for estimating the parameters of the DC machine by the Laplace transform according to an embodiment of the invention is able to maintain the transient characteristics of the DC machine during the filtering process of the noise. Moreover, the method according to the embodiment of the invention may transform the parameters of the DC machine from the time domain to the frequency domain, effectively reducing the operational complexity. Advantageously, the accuracy and operational efficiency in estimating the parameters of the DC machine can be improved.
Although the invention has been described in detail with reference to its presently preferable embodiments, it will be understood by one of ordinary skill in the art that various modifications can be made without departing from the spirit and the scope of the invention, as set forth in the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
106104157 | Feb 2017 | TW | national |