Large Dynamic Current Monitoring for UAV Steering Motor Using Twin Nonlinear Shunt

: Steering motor is of vital importance in UAV’s health-monitoring system, to which its supply current is the most critical characteristic representing health statue of UAV. In order to conduct continuous measuring on the steering motor’s current of large dynamic range, in this paper, a current measurement method is therefore proposed on the basis of twin nonlinear shunt. The proposed method adopts the twin diode as the current sampling device, which not only realizes measurement range and relative constant resolution, but also ensures continuity of the measurement due to the eliminated operation of range switching. The associated diode is used to compensate the temperature of core temperature of the shunt diode, and to make the nonlinear-shunt more adaptive for the case of junction being heated under larger current. The working principle, real-time compensation method and circuit implementation of our method are discussed in detail. Experimental test results suggest that the measurement error of the proposed method is less than 4.5% when the measurement current varies between 10 mA to 10 A, maintaining the relative resolution at an almost constant level, while preventing the conventional method of frequent range switching from generating glitches. In addition to the ensured continuity, information-rich details of the current are sustained, contributing to the UAV’s health-monitoring system. The proposal can also be applied to other applications concerning large dynamic current detection, including, but not limited to, industrial control, motor control, etc.


Introduction
Intelligentization and autonomy are the evolution trend in the future of the UAV industry; its electrical system develops complicatedly and quantitatively [1]. The implementation of self-diagnosis and intelligent decision highly depends on the health-monitoring of sophisticated components [2]. Results of health monitoring offer a comprehensive evaluation of the UAV's operation status, which not only facilitates the fault diagnosis and prediction of the potential hazards, but also helps performance degradation analysis and life prediction for critical equipment [3]. The supply current of the equipment being monitored reflects the internal status and burdens during operating. They are regarded as vital physical parameters required by health monitoring, and can be easily obtained through general measurement.
The supply current consists of the total power consumption of all the components included in the monitored equipment. The featuring information that characterizes potential hazards is often concealed in details of current change. Therefore, the current measurement must guarantee two essential factors in terms of the large range and resolution of details. Moreover, the entire measurement process must be continuous, avoiding any circuit switching [4]. Taking the steering motor as an example, it is the most critical actuator for UAV attitude control which is a compound structure of mechanical electrical parts, being under frequent regulation and dynamic load. Hence, the steering motor becomes a prioritized object to be monitored, due to its high fault probability. Abundant information on working status can be extracted from the supply current, involving the circuit status of driving controller, the mechanical state of motor and the rotation transmission system, as well as the pressure and torque of rudder surface during flight. In addition, the characterization of faults or hidden hazards can also be extracted from current ripples.
The value of the supply current of the steering motor varies in large range. When a UAV is in no-load state on the ground, only the control module is active in the steering system; the supply current decreases to dozens of milliampere level. Meanwhile, the peak value of current may rise up to tens of amperes if the motor is jammed or the gear is stuck. During flight, the supply current of steering motor is proportional to the burden on the rudder surface. With constant adjustment of the rudder angle, the varying of the motor's load causes a rapid change of current up to several amperes. Specifically, when the UAV performs highly maneuverable operations such as climbing, nosedive and hovering, the rudder torque changes rapidly. In this case, the profile of supply current reflects the force and burden of the mechanical part, whereas the detailed current ripple may implicate some forewarnings of mechanical wear and control instability. To sum up, obtaining the supply current of steering motor in large range while remaining its identifiable details is indispensable for subsequent steps in health-monitoring, flight evaluation and life estimation.
In reality, the commonly used method of expanding dynamic range of current measurement being adopted in laboratories and by general instruments may be inappropriate for noisy electromagnetic environment in flight.
In general, the current measuring circuit consists of three parts: a shunt resistor that converts current to voltage, a precision amplifier, and a quantizer that often adopts an analog-to-digital converter (ADC). For general instruments, there are commonly three kinds of method to extend the dynamic range of the measurement. Among them, one is to use high-resolution ADC for quantization, which is expected to improve resolution of the small value with a unique range [5,6]. Another method is to switch the gain of amplifier to achieve multiple ranges, forming the expected capabilities in larger dynamic measurement [7]. However, in real flight electrical systems, small shunt voltage may be submerged by the strong and unavoidable interference of noises. None of the methods can be adopted because the signal-to-noise ratio (SNR) of original shunt voltage is not substantially improved. Recently, certain advanced promising methods have also emerged [8-10], for example, adopting a series of multiple shunts while introducing the automatic bypass mechanism to realize the seamless switching of measurement range under the condition of multiple measuring circuits working simultaneously.
The third one is to expand the range by switching shunt resistor [11,12]. Under the circumstances of small current, the shunt resistor is switched into a larger one, which improves the SNR of the original shunt signal, thus avoiding the intricacies of being submerged. Nevertheless, after switching action, subsequent measurement circuit will undergo a transient change. For instance, in a typical UAV system, the sampling interval is 5 ms, and the cut-off frequency of anti-aliasing filter is usually 10-30 Hz, so most instruments need an approximate duration of tens to 100 ms for stabilization. The transient process introduces invalid measurement values, which is inapplicable to current sensing for steering motor that requires frequent switching and continuous monitoring.
Adopting a nonlinear component as shunt is an alternative that balances large dynamic range with acceptable SNR in small current. One method commonly known is using diode as shunt; according to its nonlinear current-voltage characteristic, the sensed current can be converted into voltage values following logarithmic law, to realize an inherent large dynamic measurement. Meanwhile, the continuity of the measurement process is also ensured because the switching of sampling devices is avoided [13][14][15][16].
However, owing to the significant temperature drift characteristics of diode shunt, it is critical to introduce the temperature compensation mechanism to reduce measurement errors caused by environmental temperature change [17]. Despite the above approaches, this method can only be used in micro current measurement. Only under such circumstances can the external temperature compensation mechanism be accurate, because the temperature rise in diode junction and the body resistance of the diode can be neglected. Therefore, the above method cannot be directly performed in measuring a large current. One explanation is that the large current to be measured will cause an extra rise in junction temperature, and the real-time temperature inside the diode core is hard to obtain. Another reason is that the voltage drop across body resistance cannot be ignored under the condition of large current. Hence, an additional compensation is also required to correct temperature drift of body resistance.
In this paper, the method of using twin device to perform internal temperature compensation at diode junction is proposed. This proposal enables diode shunt to realize more accurate measurement under large current condition, which is particularly applicable to the continuous monitoring of the large dynamic current of the UAV's steering motor.
A half bridge diode (HBD) is used as a twin shunt, one branch of which functions as a shunt, and the other performs as referenced in the compensation part. The symmetry exists in the manufacturing processing of the twin diode; sharing the same substrate enables an approximation of junction temperature. Therefore, the parameters obtained from the reference branch can be used to compensate the temperature drift of shunt branch. The errors are induced by temperature rise that is caused by a large current, as well as by the voltage drop on body resistance, and these can be eliminated.
In practical applications, the alternative method exhibits excellent compatibility with a conventional measurement circuit. The adoption of the proposed method can be simply realized by replacing shunt resistor with twin diode. The proposal can also be used in various types of applications for large dynamic range current monitoring.
The remainder of the paper is organized as follows. Section 2 highlights the physical and mathematical rationale in measuring current by using nonlinear twin shunt. Section 3 presents implementation and measuring results of the current-monitoring circuit. Section 4 outlines experimental results with regard to measurement errors. Section 5 summarizes the discussion and conclusions.

Consistency Analysis of Twin Diode
In this study, a diode with logarithmic current-voltage characteristics is adopted as current shunt, and a twin diode is used to perform its temperature compensation. In principle, the internal structure of certain integrated rectifiers can be regarded as twin diodes. Taking Schottky half-bridge rectifier as an example, its internal structure is shown in Figure 1. Those two rectifiers share one common substrate and metal heat sink, displaying similar current-voltage and temperature drift characteristics due to the identical manufacturing process.
Electronics 2020, 9, 1240 3 of 16 However, owing to the significant temperature drift characteristics of diode shunt, it is critical to introduce the temperature compensation mechanism to reduce measurement errors caused by environmental temperature change [17]. Despite the above approaches, this method can only be used in micro current measurement. Only under such circumstances can the external temperature compensation mechanism be accurate, because the temperature rise in diode junction and the body resistance of the diode can be neglected. Therefore, the above method cannot be directly performed in measuring a large current. One explanation is that the large current to be measured will cause an extra rise in junction temperature, and the real-time temperature inside the diode core is hard to obtain. Another reason is that the voltage drop across body resistance cannot be ignored under the condition of large current. Hence, an additional compensation is also required to correct temperature drift of body resistance.
In this paper, the method of using twin device to perform internal temperature compensation at diode junction is proposed. This proposal enables diode shunt to realize more accurate measurement under large current condition, which is particularly applicable to the continuous monitoring of the large dynamic current of the UAV's steering motor.
A half bridge diode (HBD) is used as a twin shunt, one branch of which functions as a shunt, and the other performs as referenced in the compensation part. The symmetry exists in the manufacturing processing of the twin diode; sharing the same substrate enables an approximation of junction temperature. Therefore, the parameters obtained from the reference branch can be used to compensate the temperature drift of shunt branch. The errors are induced by temperature rise that is caused by a large current, as well as by the voltage drop on body resistance, and these can be eliminated.
In practical applications, the alternative method exhibits excellent compatibility with a conventional measurement circuit. The adoption of the proposed method can be simply realized by replacing shunt resistor with twin diode. The proposal can also be used in various types of applications for large dynamic range current monitoring.
The remainder of the paper is organized as follows. Section 2 highlights the physical and mathematical rationale in measuring current by using nonlinear twin shunt. Section 3 presents implementation and measuring results of the current-monitoring circuit. Section 4 outlines experimental results with regard to measurement errors. Section 5 summarizes the discussion and conclusions.

Consistency Analysis of Twin Diode
In this study, a diode with logarithmic current-voltage characteristics is adopted as current shunt, and a twin diode is used to perform its temperature compensation. In principle, the internal structure of certain integrated rectifiers can be regarded as twin diodes. Taking Schottky half-bridge rectifier as an example, its internal structure is shown in Figure 1. Those two rectifiers share one common substrate and metal heat sink, displaying similar current-voltage and temperature drift characteristics due to the identical manufacturing process.  Tables 1 and 2 show the measured current-voltage characteristics of the Schottky half-bridge diode (model MUR3020) at two different temperatures. A current ranging from 0.1 A up to 10 A is applied simultaneously in between A1 and K, as well as in between A2 and K, respectively, thereby comparing Electronics 2020, 9, 1240 4 of 15 the voltage between two diodes. The results indicated that, over a wide operating temperature range, only~1% difference exists in the output voltage of a twin-structured diode that functions as a current sampling device.
In order to investigate thermal coupling characteristics of the twin junction, a thermal simulation analysis of the device was conducted. Simulation model is shown in Figure 2a: diode A1 functions as a shunt, diode A2 performs as a reference device, in which the given current is injected into A1, while A2 remains the unused state. The ambient temperature in the simulation model stays at room temperature, and the twin diode is mounted on a heatsink of 10 cm × 10 cm × 1 cm. The steady-state temperature difference between two junctions was examined under the condition of different given currents flowing through A1. It can be seen from Figure 2 that the heat generated by the A1 functioning as a shunt caused local temperature rise, yet the difference in junction temperature was small, which can be attributed to the close neighboring of the two diodes. During the normal flight of a UAV with its average current (about 1 A), the temperature difference between two junctions of the twin diode is 0.5 °C, which does not exceed 4 °C even under the limit current (10 A) of lock-rotor protection. Excellent thermal matching characteristics can offer possibilities in using the reference diode for temperature compensation.

Current Measurement Method Based on Twin Diode
The current measurement method that is based on the twin device is shown in Figure 3, in which A1 is the sampling diode, A2 is the reference diode, Ix is the current to be measured, Iy is the reference current being injected into the reference diode A2, K is the common cathode for A1 and A2.   Table 2. Uniformity of current-voltage characteristics of twin diodes at 100 • C.
It can be seen from Figure 2 that the heat generated by the A1 functioning as a shunt caused local temperature rise, yet the difference in junction temperature was small, which can be attributed to the close neighboring of the two diodes. During the normal flight of a UAV with its average current (about 1 A), the temperature difference between two junctions of the twin diode is 0.5 • C, which does not exceed 4 • C even under the limit current (10 A) of lock-rotor protection. Excellent thermal matching characteristics can offer possibilities in using the reference diode for temperature compensation.

Current Measurement Method Based on Twin Diode
The current measurement method that is based on the twin device is shown in Figure 3, in which A1 is the sampling diode, A2 is the reference diode, I x is the current to be measured, I y is the reference current being injected into the reference diode A2, K is the common cathode for A1 and A2.  The measurement consists of two processes that are conducted simultaneously. On one hand, the measured current Ix is sampled by diode A1 to obtain a continuous sampling voltage Ux. Meanwhile, a selectable current Iy with three values is injected into the reference diode A2 (the current is switched in between three values Iy1, Iy2, Iy3); the voltage Uy = [Uy1, Uy2, Uy3] is recorded at both ends of A2. Uy and Iy are used to solve temperature-sensitive parameters in the diode model, and to compensate for the temperature drift characteristics of A1. Finally, the measured current Ix can therefore be calculated by Ux with compensation parameters.
The diode with large current is equivalent to the model in Figure 4, in which Ux is the port voltage of the diode that can be directly measured by circuit, rd is the body-resistance of the diode, and UE represents the junction voltage of the diode. Due to the voltage drop caused by bodyresistance rd of the diode, the measured port voltage is given by: where ID represents the current flowing through the diode, the current-voltage characteristic of the diode is given by The measurement consists of two processes that are conducted simultaneously. On one hand, the measured current I x is sampled by diode A1 to obtain a continuous sampling voltage U x . Meanwhile, a selectable current I y with three values is injected into the reference diode A2 (the current is switched in between three values I y1 , I y2 , I y3 ); the voltage U y = [U y1 , U y2 , U y3 ] is recorded at both ends of A2. U y and I y are used to solve temperature-sensitive parameters in the diode model, and to compensate for the temperature drift characteristics of A1. Finally, the measured current I x can therefore be calculated by U x with compensation parameters.
The diode with large current is equivalent to the model in Figure 4, in which U x is the port voltage of the diode that can be directly measured by circuit, r d is the body-resistance of the diode, and U E represents the junction voltage of the diode. Due to the voltage drop caused by body-resistance r d of the diode, the measured port voltage is given by: where I D represents the current flowing through the diode, the current-voltage characteristic of the diode is given by It can be seen from Equation (5) that when the values of Ut, Is and rd are determined, the current ID flowing through the diode at present state can be calculated according to the measured Ux. The aforementioned three parameters are heavily temperature dependent. Among them, Ut is thermal equivalent voltage that has linear relation with junction temperature (in Kelvin). The reverse saturation current Is is also heavily temperature dependent, meaning that the value of Is doubles for every 10 K rise of temperature. rd is a nonlinear temperature-dependent parameter whose value correlates with the physical structure of the diode and with the resistivity of the semiconductor. However, it is difficult to obtain the real-time junction temperature due to currentcaused temperature rise and wide-range varying of heating power. Hence, it is neither appropriate nor accurate to compensate the drifting of measurement values according to ambient temperatures. Instead of directly using temperature value for compensation, in this study, we obtain three temperature related parameters, Ut, Is, rd, from the reference junction. Owing to the same manufacturing materials used in twin device, the electrical characteristics and thermal parameters of the two diodes can be regarded as identical. By substituting these parameters into Equation (5), the current ID of the sampling junction can be accurately calculated. Therefore, the proposed method not only avoids direct solving of temperature, but also compensates for all temperaturerelated factors.
In Figure 3, the voltage Uy of A2 can be measured when the reference diode A2 is injected with reference current Iy. In order to solve the three unknowns, ternary equations need to be established. The known reference current can be injected three times, with different values Iy = (Iy1, Iy2, Iy3) respectively, then the voltage of A2 is measured three times to obtain Uy = (Uy1, Uy2, Uy3). Substituting them into Equation (4) respectively, a set of ternary transcendental equations is established: I s is the reverse saturation current, U t is temperature-voltage equivalent. By applying logarithm operation on Equation (2), the junction voltage can therefore be expressed as It can be seen that an approximate logarithmic relation exists between the junction voltage U E and the current I D . Hence, using diode as a shunt can realize continuous measuring of the current with large dynamic range, thereby avoiding potential abnormal values that are induced by range switching in conventional methods. Usually, the magnitude order for I s stays in level of nA, hence, the condition of I D /I s >> 1 must be satisfied in measuring the large current. Substitute the simplified Equation (3) into Equation (1), By solving transcendental Equation (4), the current in the diode is given by In Equation (5), ω(x) is Wright omega function, its definition is in References [18][19][20]. It can be seen from Equation (5) that when the values of U t , I s and r d are determined, the current I D flowing through the diode at present state can be calculated according to the measured U x . The aforementioned three parameters are heavily temperature dependent. Among them, U t is thermal equivalent voltage that has linear relation with junction temperature (in Kelvin). The reverse saturation current I s is also heavily temperature dependent, meaning that the value of I s doubles for every 10 K rise of temperature. r d is a nonlinear temperature-dependent parameter whose value correlates with the physical structure of the diode and with the resistivity of the semiconductor. However, it is difficult to obtain the real-time junction temperature due to current-caused temperature rise and wide-range varying of heating power. Hence, it is neither appropriate nor accurate to compensate the drifting of measurement values according to ambient temperatures.
Instead of directly using temperature value for compensation, in this study, we obtain three temperature related parameters, U t , I s , r d , from the reference junction. Owing to the same manufacturing materials used in twin device, the electrical characteristics and thermal parameters of the two diodes can be regarded as identical. By substituting these parameters into Equation (5), the current I D of the Electronics 2020, 9, 1240 7 of 15 sampling junction can be accurately calculated. Therefore, the proposed method not only avoids direct solving of temperature, but also compensates for all temperature-related factors.
In Figure 3, the voltage U y of A2 can be measured when the reference diode A2 is injected with reference current I y . In order to solve the three unknowns, ternary equations need to be established. The known reference current can be injected three times, with different values I y = (I y1 , I y2 , I y3 ) respectively, then the voltage of A2 is measured three times to obtain U y = (U y1 , U y2 , U y3 ). Substituting them into Equation (4) respectively, a set of ternary transcendental equations is established: The three parameters U t , I s , r d can be obtained by solving Equation (6). However, due to analytical solutions, they cannot be obtained directly from transcendental equations; an optimized solving method is therefore adopted, by which a three-dimensional search vector P = (U t ' , I s ' , r d ' ) is established, thereby obtaining voltage estimation vector by substituting P into Equation (4).
If the estimation vector U ' = (U y1 ' , U y2 ' , U y3 ' ) contained in Equation (7) converges to the measured vector U = (U y1 , U y2 , U y3 ) in Equation (6), i.e., if U '→ U, the searching vector P can be regarded as an approximate numerical solution of Equation (6), upon which an objective function is established as follows: Therefore, the problem of solving Equation (6) is transformed into constrained optimization, meaning that searching for the optimal searching vector P to minimize objective function E, which can be expressed as: For the above issue, the constraint is the search range of three variables that can be determined by theoretical estimation within a possible temperature range. The problem of three-variable constrained optimization can be solved via one of the following ways which involve gradient descent, Newton and conjugate direction methods. Because temperature is a slow variable, each search result should fall near the last optimal solution, hence, only a local optimal solution is needed, for which reason the gradient descent method is adopted.
To verify the effectiveness of the proposed method, a Schottky half-bridge device (Model MUR3020) is used. First, different values of the current I y = (10 mA, 100 mA, 1 A) are injected into the reference diode A2 respectively, then the voltage U y of A2 can be measured, throughout which I y injection time is very short, thereby avoiding an additional temperature rise. Second, the optimization process of Equation (9) is performed to calculate thermal parameters P of the diode. The current-voltage curve of the device can be fitted by using Equation (4).
Maintaining same temperature conditions, inject multiple currents to be measured into the sampling diode A1, and the voltage of A1 can be measured. The deviation between the measured data of A1 and the fitting curve is shown in Figure 5. The diode is mounted on a large-sized heat sink, and corresponding experiments are conducted at a junction temperature of 25 • C and 100 • C, respectively. Experimental results indicated that solving thermal parameters to deduce the current of the twin device has proven to be effective. In this experiment, the current flowing through shunt diode A1 and through reference diode A2 are short-time single pulses, so the junction temperature is mainly determined by ambient temperatures. In practical applications, however, the current flowing through A1 is continuous and changing, causing its junction temperature to vary with the change of the current to be measured. Hence, it is required that the estimation of the thermal parameters of A2 must be accomplished within a time period that is far less than the intrinsic thermal response time of the diode.
Generally, thermal response time depends on the product of thermal resistance and thermal capacity, hence, mounting a larger heat sink with sufficient thermal capacity on the sampling device helps one to extend thermal characteristic time, thereby reducing the speed requirements for optimized search calculation on the reference diode. In the UAV system, the required large thermal capacity can also be achieved through using common mechanical structures such as the shell of airborne devices. Specifically, the time allowed for obtaining the solution of the parameters of the reference device stays no less than a magnitude order of 100 ms, which is much shorter than the sampling interval on the diode A1. Therefore, the computation of the A2 thermal parameters can be assigned as background tasks for the computer, without requiring high real-time performance.

Consistency Analysis of Twin Diode
where Us is the voltage output, Rs is the resistance value of shunt, and A is the gain of amplifier. In measuring large dynamic current, conventional methods require the manual switching of the shunt Rs or of the amplification gain A to adapt dynamic current ranges, at which moment certain glitches may occur due to the switching in the signal path. Moreover, after the completion of range switching, subsequent amplification, filtering and other circuits have to undergo a transient In this experiment, the current flowing through shunt diode A1 and through reference diode A2 are short-time single pulses, so the junction temperature is mainly determined by ambient temperatures. In practical applications, however, the current flowing through A1 is continuous and changing, causing its junction temperature to vary with the change of the current to be measured. Hence, it is required that the estimation of the thermal parameters of A2 must be accomplished within a time period that is far less than the intrinsic thermal response time of the diode.
Generally, thermal response time depends on the product of thermal resistance and thermal capacity, hence, mounting a larger heat sink with sufficient thermal capacity on the sampling device helps one to extend thermal characteristic time, thereby reducing the speed requirements for optimized search calculation on the reference diode. In the UAV system, the required large thermal capacity can also be achieved through using common mechanical structures such as the shell of airborne devices. Specifically, the time allowed for obtaining the solution of the parameters of the reference device stays no less than a magnitude order of 100 ms, which is much shorter than the sampling interval on the diode A1. Therefore, the computation of the A2 thermal parameters can be assigned as background tasks for the computer, without requiring high real-time performance. Figure 6a shows conventional current measuring circuit. The voltage across the shunt R s is amplified and then sampled by subsequent ADC. The measured current value can be calculated according to Equation (10),

Consistency Analysis of Twin Diode
where U s is the voltage output, R s is the resistance value of shunt, and A is the gain of amplifier.
In measuring large dynamic current, conventional methods require the manual switching of the shunt R s or of the amplification gain A to adapt dynamic current ranges, at which moment certain glitches may occur due to the switching in the signal path. Moreover, after the completion of range switching, subsequent amplification, filtering and other circuits have to undergo a transient process, which requires a period of time for these circuits to restore the steady-state. This will factitiously generate invalid data for the subsequent sampling process. Moreover, frequent range switching may even destroy data credibility, which may further induce false alarms for the health-monitoring system.
Electronics 2020, 9, 1240 10 of 16 Figure 6b shows the proposed measuring circuit that is based on a twin diode; it adopts one branch of the twin diode (A1) to substitute the sampling resistor Rs of Figure 6a. The nonlinear shunt voltage Ux across A1 is obtained, and the range switching is no longer needed. The reference diode A2 is injected with the current of different values Iy = (Iy1, Iy2, Iy3) three times, and the voltage Uy = (Uy1, Uy2, Uy3) across A2 is measured, after which the Ut, Is, rd of the diode junction are calculated according to Equation (10). Consequently, the current flowing through the sampling diode can be calculated by Equation (5). Although the above method also adopts a switching design, only the injected current Iy of A2 is switched, which does not induce glitches for the measurement results obtained from A1, thereby ensuring the continuity of current measurement.  Figure 7 is the schematic diagram of large dynamic current monitor circuit based on nonlinear twin device, including current sampling module, reference current generation module, two-channel ADC and the central processing unit (CPU) and/or micro-controller unit (MCU). In the current sampling module, twin diodes (A1 and A2, in MUR3020) are used to sample the motor current and reference current, and then two-channel ADC is used to quantify the voltage outputs from A1 and A2.  Figure 6b shows the proposed measuring circuit that is based on a twin diode; it adopts one branch of the twin diode (A1) to substitute the sampling resistor R s of Figure 6a. The nonlinear shunt voltage U x across A1 is obtained, and the range switching is no longer needed. The reference diode A2 is injected with the current of different values I y = (I y1 , I y2 , I y3 ) three times, and the voltage U y = (U y1 , U y2 , U y3 ) across A2 is measured, after which the U t , I s , r d of the diode junction are calculated according to Equation (10). Consequently, the current flowing through the sampling diode can be calculated by Equation (5). Although the above method also adopts a switching design, only the injected current I y of A2 is switched, which does not induce glitches for the measurement results obtained from A1, thereby ensuring the continuity of current measurement. Figure 7 is the schematic diagram of large dynamic current monitor circuit based on nonlinear twin device, including current sampling module, reference current generation module, two-channel ADC and the central processing unit (CPU) and/or micro-controller unit (MCU).

Circuit Implementation
In the current sampling module, twin diodes (A1 and A2, in MUR3020) are used to sample the motor current and reference current, and then two-channel ADC is used to quantify the voltage outputs from A1 and A2.
The reference current generation module provides a three-value switchable reference current for the reference diode. By switching the reference voltage controlled by the processor, the output voltage of the direct current-direct current (DC-DC) circuit is changed, thereby changing the value of the reference current flowing through the A2 diode. In addition, a negative feedback loop is introduced to ensure the stability of the reference current. In CPU/MCU, a periodic foreground task is used to sample the U x , another background task is used to switch I y and perform temperature compensation calculation.  Figure 7 is the schematic diagram of large dynamic current monitor circuit based on nonlinear twin device, including current sampling module, reference current generation module, two-channel ADC and the central processing unit (CPU) and/or micro-controller unit (MCU). In the current sampling module, twin diodes (A1 and A2, in MUR3020) are used to sample the motor current and reference current, and then two-channel ADC is used to quantify the voltage outputs from A1 and A2.

Analysis of the Current Resolution
When linear ADC is used for sampling, quantification of the voltage U x is featured with a constant resolution where U ref represents the reference voltage of ADC, N is the binary resolution digit of ADC, A x is the analog channel gain. When the measured current is I m , the measured voltage U m obtained on the nonlinear shunt is given by the resolution of measuring system to measured current can be expressed as differentiating at U m with respect to Equation (5): in a typical application, the ADC chip with 12-bit resolution is selected, and the reference voltage U ref = 1.5 V is taken for direct measurement (A X = 1). According to Equation (11), U res is equal to 0.366 mV, by substituting it in Equation (13); the relation between I res and the current to be measured I m is shown in the following figure. Figure 8 indicates that the current resolution I res exhibits its automatic self-adapting characteristics according to the current to be measured, meaning that when the current to be measured is small, the resolution of I res is finer, thereby guaranteeing smaller quantification errors. When the current to be measured becomes larger, the resolution of I res becomes coarser to trade off larger measurement range. Hence, the aforementioned circuit not only measures micro current, but also enables continuous measuring of the current featuring large dynamic range without switching operation. Taking small-size UAV's steering motor as an example, its typical supply current ranges from 40 mA to 2.0 A, to which the stand-by current is reduced to a level of 10 mA and may rise up to 10 A if its rotor is locked. Within the above current range, the relative quantification error within the whole measurement range remains basically constant.

Experimental Setup
An experiment is implemented to realize the proposed method of large dynamic current monitoring, in which the composition and installation of the implementation are shown in Figure 9. We adopt a variable constant current source and a steering motor with workload as two current sources to be measured. A conventional current measurement system with automatic range switching is used for comparison. The current source to be measured can be selected by switching S. By selecting the constant current source (S = T1), the relative error and current measurement range of the proposed method can be tested, while the selection of the actual steering motor (S = T2) exhibits the capability of the proposed method in monitoring the continuous change current of the steering motor.

Steady Testing
If the switch S shown in Figure 9 is shifted to the T1 end, and the steady-state current can be measured to test the relative error of the proposed method, the set value of the constant current source is taken as the true value of the current to be measured (Itruth), and the true value is

Experimental Setup
An experiment is implemented to realize the proposed method of large dynamic current monitoring, in which the composition and installation of the implementation are shown in Figure 9. We adopt a variable constant current source and a steering motor with workload as two current sources to be measured. A conventional current measurement system with automatic range switching is used for comparison. The current source to be measured can be selected by switching S. By selecting the constant current source (S = T1), the relative error and current measurement range of the proposed method can be tested, while the selection of the actual steering motor (S = T2) exhibits the capability of the proposed method in monitoring the continuous change current of the steering motor.

Experimental Setup
An experiment is implemented to realize the proposed method of large dynamic current monitoring, in which the composition and installation of the implementation are shown in Figure 9. We adopt a variable constant current source and a steering motor with workload as two current sources to be measured. A conventional current measurement system with automatic range switching is used for comparison. The current source to be measured can be selected by switching S. By selecting the constant current source (S = T1), the relative error and current measurement range of the proposed method can be tested, while the selection of the actual steering motor (S = T2) exhibits the capability of the proposed method in monitoring the continuous change current of the steering motor.

Steady Testing
If the switch S shown in Figure 9 is shifted to the T1 end, and the steady-state current can be measured to test the relative error of the proposed method, the set value of the constant current source is taken as the true value of the current to be measured (Itruth), and the true value is

Steady Testing
If the switch S shown in Figure 9 is shifted to the T1 end, and the steady-state current can be measured to test the relative error of the proposed method, the set value of the constant current source is taken as the true value of the current to be measured (I truth ), and the true value is measured by an ammeter. The relative error of the proposed circuit for current measurement can be expressed as: where I m is the current value measured by the proposed circuit. By adjusting the output current of the constant current source to maintain the current output range between 10 mA to 10 A, the output value of U x in the circuit can be measured with a multimeter. As shown in Figure 9, it can be seen that when the range of the current to be measured stays between 10 mA to 10 A, the logarithm of the output voltage and of the current to be measured exhibits an approximate linear relation. Table 3 shows results of the relative error, showing that the measurement error of the measurement circuit is less than 4.5%. The error tends to increase slightly at large currents, which may be caused by junction temperature differences. Moreover, the current resolution I res can be adjusted automatically according to the measured current value.

Dynamic Current Testing
The switch S in Figure 8 is shifted to T2 to test the capability of the proposed method in measuring the large transient current of the steering motor. In the experiment, we applied a rudder load to the steering motor and measured the supply current of the motor when the control signal is step changed. The sampling interval is 5 ms, which is consistent with the UAV's monitoring system. The measurement results were compared with the conventional method of range switching. The experimental results are shown in Figure 10.
The switch S in Figure 8 is shifted to T2 to test the capability of the proposed method in measuring the large transient current of the steering motor. In the experiment, we applied a rudder load to the steering motor and measured the supply current of the motor when the control signal is step changed. The sampling interval is 5 ms, which is consistent with the UAV's monitoring system. The measurement results were compared with the conventional method of range switching. The experimental results are shown in Figure 10.   In the above figure, the red curve represents the working current of the steering motor, which is inversely deduced through mathematical model according to the load torque being applied to the steering motor. In Figure 10, (a) and (b) indicate that, if the current varies in between a large range, the conventional method needs to conduct range switching operations to obtain a higher resolution of measurement. For the conventional method, glitches occur at range switching points (200 mA and 2 A), resulting in significant false outliers. The result of turning on anti-aliasing filters (cut-off frequency is 20 Hz, 2nd order Bessel filter) is shown in Figure 10c,d, and the occurrence time of glitches is marked with additional labels accordingly. It can be seen that the proposed method can perform continuous measuring on the steering motor's changing working current. Even if there is a large current change in the motor, outliers will not occur in the measurement result.

Discussion and conclusions
The method proposed in this paper realizes the continuous measuring of a large dynamic range current that exists in the UAV's steering motor. In contrast to conventional multi-range current measurement, the proposed method prevents frequent range switching from generating outliers. Aiming at ensuring the continuity of monitoring a large dynamic current, our method is of vital importance for UAV's health-monitoring system. In practical applications, the proposed method still has its relative error of 3-5%, to which certain potential factors may be attributed with respect to the difference of twin diode's consistency and of core temperature. Despite the above shortcomings, such precision is sufficient for health-monitoring, because health-monitoring takes into consideration more seriously the relative change of current. However, the proposed method In the above figure, the red curve represents the working current of the steering motor, which is inversely deduced through mathematical model according to the load torque being applied to the steering motor. In Figure 10, (a) and (b) indicate that, if the current varies in between a large range, the conventional method needs to conduct range switching operations to obtain a higher resolution of measurement. For the conventional method, glitches occur at range switching points (200 mA and 2 A), resulting in significant false outliers. The result of turning on anti-aliasing filters (cut-off frequency is 20 Hz, 2nd order Bessel filter) is shown in Figure 10c,d, and the occurrence time of glitches is marked with additional labels accordingly. It can be seen that the proposed method can perform continuous measuring on the steering motor's changing working current. Even if there is a large current change in the motor, outliers will not occur in the measurement result.

Discussion and Conclusions
The method proposed in this paper realizes the continuous measuring of a large dynamic range current that exists in the UAV's steering motor. In contrast to conventional multi-range current measurement, the proposed method prevents frequent range switching from generating outliers. Aiming at ensuring the continuity of monitoring a large dynamic current, our method is of vital importance for UAV's health-monitoring system. In practical applications, the proposed method still Electronics 2020, 9,1240 14 of 15 has its relative error of 3-5%, to which certain potential factors may be attributed with respect to the difference of twin diode's consistency and of core temperature. Despite the above shortcomings, such precision is sufficient for health-monitoring, because health-monitoring takes into consideration more seriously the relative change of current. However, the proposed method can maintain the relative resolution at a relatively constant level, which is more critical than the absolute precision of measured values.
The method requires three different current values to be injected into the reference device to calculate three thermal parameters of the diode shunt. From the perspective of ensuring precision of iterative calculation, the range of these values of the injected current should cover measurement range to the largest extent, which will significantly increase the power consumption of the system. Hence, finding a trade-off between precision and power consumption can be realized by the proper reduction of the reference current value.
In solving parameters U t , I s , r d , the proposed method adopts the gradient search algorithm, due to difficulties in finding analytical solution to transcendental equations, about which the situation brings an unpredictable time required by iterative convergence. Actual test results suggested that the required time usually varies within the range between dozens and hundreds of a millisecond. Undoubtedly, suppose the twin device exhibits its excellent heat capacity performance due to sufficient cooling, then the required calculation duration is still much smaller than the system's thermal response time, and the temperature matching can still be considered as established.
Despite the aforementioned disadvantages, the proposed method can ensure the continuity of measurement and the consistency of relative resolution under the condition of large dynamic current. This current sensing system offers information-rich data for UAV's health-monitoring system, facilitating real-time monitoring and malfunction analysis with respect to supply current. The proposed method can also be applied to other large dynamic current monitoring applications, including, but not limited to, industrial control, motor control, etc.