A Novel Method for Sensorless Speed Detection of Brushed DC Motors

Abstract: Many motor applications require accurate speed measurement. For brushed dc motors, speed can be measured with conventional observers or sensorless observers. Sensorless observers have the advantage of not requiring any external devices to be attached to the motor. Instead, voltage and/or current are measured and used to estimate the speed. The sensorless observers are usually divided into two groups: those based on the dynamic model, and those based on the ripple component. This paper proposes a method that measures the current of brushed dc motors and analyses the position of its spectral components. From these spectral components, the method estimates the motor speed. Three tests, performed each with the speeds ranging from 2000 to 3000 rpm either at constant-speed, at slowly changing speeds, or at rapidly changing speeds, showed that the average error was below 1 rpm and that the deviation error was below 1.5 rpm. The proposed method: (i) is a novel method that is not based on either the dynamic model or on the ripple component; (ii) requires only the measurement of the current for the speed estimation; (iii) can be used for brushed dc (direct current) motors with a large number of coils; and (iv) achieves a low error in the speed estimation.


Introduction
There are two broad groups of dc (direct current)) motors: brushed dc motors and brushless dc motors. The first group has brushes and a commutator, while the second one does not. The advantage of brushed dc motors is that they can be easily controlled. Because of this, they have been the most popular motor type in the past, and they continue to be used in many applications today. Brushed dc motors can be used for either low or high power applications. Usually, low-power brushed dc motors are used in domestic applications, although they may also be used in some industry sectors, such as the automotive industry. On the other hand, high-power brushed dc motors are mainly used in industrial applications.
There are two types of observers for detecting the speed of a brushed dc motor: conventional observers and sensorless observers. Conventional observers are devices such as encoders, tachometers, and Hall sensors, among others. They are independent devices attached to the motor shaft. Consequently, they can be a source of failures and they increase cost and maintenance [1]. Sensorless observers are algorithms that estimate speed and/or position of motors from a voltage or current signal of the motor.
The main advantages of sensorless observers include decreased maintenance, reduced number of connections, lower system cost, and easier miniaturization of the system.
The use of sensorless observers for measuring motor speed is divided into two groups [2]: those based on the dynamic model, and those based on the ripple component:

•
The observers based on the dynamic model estimate the speed using a model of the brushed dc motor. A linear model is usually used [3,4], but this type of model has the problem that the parameters used, such as resistance, inductance, and back electromotive force (back-EMF), change under different operating conditions [5,6]. In this situation, the parameters are adjusted for one specific work condition and they are not modified. Consequently, the observers work correctly when operating conditions are similar to the specified conditions, but they do not work as well when the operating conditions differ from the specified conditions. A first solution for this is to dynamically estimate the parameters of the model [7][8][9], but this generates a complex model that is usually nonlinear. A second solution is to use a nonlinear model of the brushed dc motor [10][11][12], or a technique that indirectly models the motor, such as Neural Networks [13,14] and the Kalman filter [15,16]. The problem with these solutions is that they have a high computational cost, and the estimation of the parameters used is not an easy task. A third solution is to use a method with a simple model that is only valid in a specific condition. For example, the method can model the motor only when the supply turns off [17]. The problem with this method is that the speed can only be measured if the condition is met.

•
The observers based on the ripple component use a part of the ac current signal, which is called the ripple component [2,18]. This component is the result of two effects. The first effect is produced because the electromotive force induced in each coil has a sinusoidal shape, and it is not perfectly rectified by the brush-commutator system [19]. The second effect is produced because the brushes in the commutator sometimes short two adjacent commutator segments, joining the terminals of the coils connected to these commutator segments, resulting in peaks in the current [20]. Both effects produce undulations in the current. The number of undulations per second, or ripple frequency, is related to motor speed [21]. Many methods in the literature use the ripple component [2,18,[22][23][24][25].
The detection of undulations in sensorless observers based on the ripple component can be difficult because of noise [26]. Noise produces ghost undulations, which are unobservable undulations of the ripple component. Noise also produces false undulations, which are undulations in the current that do not belong to the ripple component of the current. There are studies that detected ghost undulations and discarded false undulations [27,28], but the employed methods were complex and had a high computational cost.
The ripple component depends directly on the number of coils in the motors, because this component is produced by the rectification of the brush-commutator system. Then, when the number of coils in the motor is small, the rectification done by the system brush-commutator is far from the ideal, whereas when the number of coils in the motor is large, the rectification done by the system brush-commutator is close to the ideal, in other words, just consisting of a dc component. In this way, sensorless observers based on the ripple component can be used in brushed dc motors with a small number of coils, such as fractional horsepower brushed dc motors, because the ripple component is large enough to be detected. In contrast, sensorless observers based on the ripple component cannot be used in brushed dc motors with a large number of coils because the ripple component is not large enough to be detected. This paper presents a new method that measures the current of brushed dc motors and analyzes the position of its spectral components in order to estimate the motor speed. This method can be used in motors with a large number of coils, as in integral horsepower dc motors. Section 2 describes the different spectral components present in the current and establishes which ones are important in brushed dc motors with a small number of coils, as in fractional horsepower brushed dc motors, and which are important in brushed dc motors with a large number of coils such as integral horsepower brushed dc motors. Section 3 presents the proposed sensorless method for estimating the speed of brushed dc motors. Section 4 presents experiments used to validate this method. Finally, Section 5 presents the conclusions derived from this research.

Spectral Components of Brushed DC Motor Current
The voltage and current of brushed dc motors have two different spectral components: dc and ac (alternating current). The dc component is the supply power. The ac component is mainly produced by the back-EMF, which is induced in the coils. The back-EMF is a voltage signal added to the voltage of the dc motor. Figure 1 represents a real brushed dc motor and Thévenin's equivalent of a power supply that supplies the motor. The power supply is modeled according to Thévenin's equivalent circuit with an ideal source and series resistance, where V cc is the ideal voltage source and R s is the series resistance. From this, the relation between voltage V m and current I m , of a brushed dc motor is given by: Two observations can be done according to Equation (1). The first is that because V cc and R s are constants, the current and voltage of the motor will be related to each other, and every component in the voltage will also be present in the current. The second is that R s is usually small, and V cc is similar to V m . Therefore, the magnitude of the current spectral components compared to that of the current dc component will be larger than the magnitude of the voltage spectral components compared to that of the voltage dc component. Consequently, measuring the current spectral components will be easier than measuring the voltage spectral components. Then, spectral components of the current are usually employed for sensorless speed detection of brushed dc motors, instead of employing the spectral components of the voltage.
The nature of the spectral components will be described in the next two subsections.

Spectral Components of Brushed DC Motor Current
The voltage and current of brushed dc motors have two different spectral components: dc and ac (alternating current). The dc component is the supply power. The ac component is mainly produced by the back-EMF, which is induced in the coils. The back-EMF is a voltage signal added to the voltage of the dc motor. Figure 1 represents a real brushed dc motor and Thévenin's equivalent of a power supply that supplies the motor. The power supply is modeled according to Thévenin's equivalent circuit with an ideal source and series resistance, where V is the ideal voltage source and R is the series resistance. From this, the relation between voltage V and current I , of a brushed dc motor is given by: Two observations can be done according to Equation (1). The first is that because V and R are constants, the current and voltage of the motor will be related to each other, and every component in the voltage will also be present in the current. The second is that R is usually small, and V is similar to V . Therefore, the magnitude of the current spectral components compared to that of the current dc component will be larger than the magnitude of the voltage spectral components compared to that of the voltage dc component. Consequently, measuring the current spectral components will be easier than measuring the voltage spectral components. Then, spectral components of the current are usually employed for sensorless speed detection of brushed dc motors, instead of employing the spectral components of the voltage.
The nature of the spectral components will be described in the next two subsections.

Ripple Component
Brushed dc motors have a number of coils, , in the rotor, which are connected to an external circuit through brushes and a commutator. According to Faraday's law, when the motor is rotating, a back electromotive force (back-EMF) is induced in each coil. This back-EMF is rectified by the brushes and commutator, and carried to an external circuit. The back-EMF and commutation occur in each coil such that the back-EMFs are added and rectified by the brushes and commutator. The rectification ideally produces a constant signal in the external circuit. In contrast, the real rectification process produces a small ac component added to a constant signal in the external circuit. This ac component is the ripple component.
The amplitude of the ripple component depends on the number of coils, the inductance of the coils, and the power of the motor. The frequency of the ripple component depends on the number of undulations per second produced in the current. Each undulation is produced when a coil is in front of a pole of a brushed dc motor. This pole can be either a north or south magnetic pole. There is no difference in pole polarity because of the rectification by the commutator.
A study conducted by Baoguo et al. [21] relates the frequency of the ripple components, , to the number of field poles, 2 , the number of commutator segments, , and the motor speed, , as:

Ripple Component
Brushed dc motors have a number of coils, B, in the rotor, which are connected to an external circuit through brushes and a commutator. According to Faraday's law, when the motor is rotating, a back electromotive force (back-EMF) is induced in each coil. This back-EMF is rectified by the brushes and commutator, and carried to an external circuit. The back-EMF and commutation occur in each coil such that the back-EMFs are added and rectified by the brushes and commutator. The rectification ideally produces a constant signal in the external circuit. In contrast, the real rectification process produces a small ac component added to a constant signal in the external circuit. This ac component is the ripple component.
The amplitude of the ripple component depends on the number of coils, the inductance of the coils, and the power of the motor. The frequency of the ripple component depends on the number of undulations per second produced in the current. Each undulation is produced when a coil is in front of a pole of a brushed dc motor. This pole can be either a north or south magnetic pole. There is no difference in pole polarity because of the rectification by the commutator.
A study conducted by Baoguo et al. [21] relates the frequency of the ripple components, f r , to the number of field poles, 2p, the number of commutator segments, k, and the motor speed, n, as: f r = (2p·k·n)/(60·η) (2) where η is the largest common divisor of 2p and k. This component is important in brushed dc motors with a small number of coils, as in fractional horsepower brushed dc motors, because the amplitude of the ripple component is relatively large [29].

Other Spectral Components
Brushed dc motors are composed of two circuits: the armature circuit and the field circuit. The interaction of the magnetic field produced by each circuit develops torque on the rotor, causing rotation. The rotation is produced according to Faraday's law and the Lorentz force law. The back-EMF is produced according to Faraday's law and the torque is developed according to the Lorenz force law [30]. According to Faraday's law, the back-EMF induced in coil i of a brushed dc motor is: where the magnetic flux in the coil i, φ i , is, and B is the magnetic flux density, da is the differential area element, and S i is the area of the coil i. The brush voltage in the brushed dc motor, V, is the sum of the rectified induced voltage of every coil: Because each coil and pole in a brushed dc motor is unique, the induced voltage associated with each coil, V i , has a slightly different shape compared to the voltage of other coils. Furthermore, the phases are also different because the position of every coil in the rotor is different. Because of this, and according to Equation (5), the back-EMF at the brushes, V, has a characteristic shape that is repeated at every rotation of the rotor. The period of this repetition is the inverse of the number of revolutions per second of the motor, and its frequency is the motor speed in number of revolutions per second. The Fourier series can be used to decompose V as: where l is the index of the Fourier series, A l and θ l are the coefficients of the Fourier series, n/60 is the revolutions per second of the motor, and n is the revolutions per minute [31]. The Fourier transform of Equation (6) results in: where f is the frequency, B l is the complex coefficient that depends on the coefficients of the Fourier series A l and θ l , and δ(·) is the Dirac delta function. According to Equation (7), the spectrum of the voltage has different spectral components, with a component at each of the following frequencies: f l = l(n/60) (8) and the distance between components is equal to: As pointed out in Section 2, the current and voltage are related, so their spectra are also related. Therefore, every component in the voltage spectrum is also present in the current spectrum, and there is an equivalent expression from Equations (6) to (9) available for the current.
The frequency of the ripple component is in a multiple of n/60 according to Equation (2), thus, it coincides with a frequency produced by the method explained in this subsection according to Equation (8). The ripple frequency corresponds to the index l = (2p·k)/η and it is the main component related to the motor speed.
Because each V i is only slightly different from the rest, the variations in the voltage and current are small, and the weights of the coefficients A l are also small.
The spectral components produced by this effect can be easily detected in the current when the amplitude of the ripple component is similar to the amplitude of these components. This is the case for brushed dc motors with a large number of coils, such as integral horsepower brushed dc motors.
An example of the current amplitude spectrum of a real integral horsepower brushed dc motor is shown in Figure 2. /60 (8) and the distance between components is equal to: As pointed out in Section 2, the current and voltage are related, so their spectra are also related. Therefore, every component in the voltage spectrum is also present in the current spectrum, and there is an equivalent expression from Equations (6) to (9) available for the current.
The frequency of the ripple component is in a multiple of /60 according to Equation (2), thus, it coincides with a frequency produced by the method explained in this subsection according to Equation (8). The ripple frequency corresponds to the index 2 /η and it is the main component related to the motor speed. Because each is only slightly different from the rest, the variations in the voltage and current are small, and the weights of the coefficients are also small. The spectral components produced by this effect can be easily detected in the current when the amplitude of the ripple component is similar to the amplitude of these components. This is the case for brushed dc motors with a large number of coils, such as integral horsepower brushed dc motors.
An example of the current amplitude spectrum of a real integral horsepower brushed dc motor is shown in Figure 2.

Proposed Method
This paper presents a new method to estimate the speed of brushed dc motors using the spectral components of the motor current. This method has been developed for brushed dc motors with a large number of coils, as in integral horsepower brushed dc motors, where the amplitude of the ripple component is similar to the amplitude of other components related to the motor speed, see Section 2. The block diagram of the proposed method, shown in Figure 3, shows the five blocks of the method: the Buffer block, the Estimator block, the Tracking Frequency block, the Supervisor block, and the Converter block.

Proposed Method
This paper presents a new method to estimate the speed of brushed dc motors using the spectral components of the motor current. This method has been developed for brushed dc motors with a large number of coils, as in integral horsepower brushed dc motors, where the amplitude of the ripple component is similar to the amplitude of other components related to the motor speed, see Section 2. The block diagram of the proposed method, shown in Figure 3, shows the five blocks of the method: the Buffer block, the d f m Estimator block, the Tracking Frequency block, the Supervisor block, and the Converter block. /60 (8) and the distance between components is equal to: As pointed out in Section 2, the current and voltage are related, so their spectra are also related. Therefore, every component in the voltage spectrum is also present in the current spectrum, and there is an equivalent expression from Equations (6) to (9) available for the current.
The frequency of the ripple component is in a multiple of /60 according to Equation (2), thus, it coincides with a frequency produced by the method explained in this subsection according to Equation (8). The ripple frequency corresponds to the index 2 /η and it is the main component related to the motor speed. Because each is only slightly different from the rest, the variations in the voltage and current are small, and the weights of the coefficients are also small. The spectral components produced by this effect can be easily detected in the current when the amplitude of the ripple component is similar to the amplitude of these components. This is the case for brushed dc motors with a large number of coils, such as integral horsepower brushed dc motors.
An example of the current amplitude spectrum of a real integral horsepower brushed dc motor is shown in Figure 2.

Proposed Method
This paper presents a new method to estimate the speed of brushed dc motors using the spectral components of the motor current. This method has been developed for brushed dc motors with a large number of coils, as in integral horsepower brushed dc motors, where the amplitude of the ripple component is similar to the amplitude of other components related to the motor speed, see Section 2. The block diagram of the proposed method, shown in Figure 3, shows the five blocks of the method: the Buffer block, the Estimator block, the Tracking Frequency block, the Supervisor block, and the Converter block.

Buffer Block
The Buffer block (Figure 3) stores the current samples for the previous T b seconds, and outputs a vector with the last samples collected during this time. The input of the Buffer block is the current sample, i, and the output is the set of the current samples that have been stored, i.

d f m Estimator Block
The d f m Estimator block makes an initial estimation of the distance between frequencies in the current spectrum that are related to the motor speed, d f m . This estimation is later used by subsequent blocks to initialize the first estimation of the position of one frequency component in the current spectrum.
This block (Figure 3) has two inputs and one output. The inputs are i, the vector with the current samples stored in the buffer, and ex_d f m, the Boolean value that indicates whether or not the block is to be executed. When ex_d f m has a Ture value, the block is executed, and when it has a False value, the block is not executed. When the block is executed, it makes the initial estimation of d f m .
The block diagram of the d f m Estimator block when it is executed, in other words, when the value of ex_d f m is True, is shown in Figure 4. As shown, there are several steps in the d f m Estimator block required to obtain an accurate value for the distance between frequencies in the current spectrum. The distance between frequencies is related to the motor speed.

Buffer Block
The Buffer block ( Figure 3) stores the current samples for the previous seconds, and outputs a vector with the last samples collected during this time. The input of the Buffer block is the current sample, , and the output is the set of the current samples that have been stored, .

Estimator Block
The Estimator block makes an initial estimation of the distance between frequencies in the current spectrum that are related to the motor speed, . This estimation is later used by subsequent blocks to initialize the first estimation of the position of one frequency component in the current spectrum.
This block (Figure 3) has two inputs and one output. The inputs are , the vector with the current samples stored in the buffer, and e _ , the Boolean value that indicates whether or not the block is to be executed. When _ has a value, the block is executed, and when it has a value, the block is not executed. When the block is executed, it makes the initial estimation of . The block diagram of the Estimator block when it is executed, in other words, when the value of _ is , is shown in Figure 4. As shown, there are several steps in the Estimator block required to obtain an accurate value for the distance between frequencies in the current spectrum. The distance between frequencies is related to the motor speed.

The
Estimator block (Figure 3) calculates the Fast Fourier Transform (FFT) over the vector of the sampled current to obtain its spectrum. However, not all components of the current spectrum are used in the algorithm. Instead, the next block selects the frequencies between and , and only the frequencies between and are used. The region outside this window contains significant noise, and will not be helpful in the estimation. Another reason for not using values outside this region is the additional computational cost of the algorithm if those frequencies were included. To decrease the effect of noise on the estimate of the distance between frequencies, autocorrelation is performed on the spectrum band window between and : where is the autocorrelation, is the current spectrum between and , ̅ is the mean value of the current spectrum between and , is the length or number of samples of the spectrum between and , and is the discrete index. This autocorrelation formula is unusual because the mean value is previously subtracted from the input. This action eliminates the effect of the mean value in the autocorrelation and it ensures that the autocorrelation ground level will not decrease as the index is increased. This facilitates the detection of peaks in the autocorrelation signal.
The autocorrelation signal has different peaks that are related to the distance between frequencies present in the current spectrum. For example, the first peak in the autocorrelation indicates the distance between peaks in the spectrum signal, the second is two times this distance, and the third is three times this distance. So the distance between two consecutive peaks is the The d f m Estimator block (Figure 3) calculates the Fast Fourier Transform (FFT) over the vector of the sampled current to obtain its spectrum. However, not all components of the current spectrum are used in the algorithm. Instead, the next block selects the frequencies between f min and f max , and only the frequencies between f min and f max are used. The region outside this window contains significant noise, and will not be helpful in the estimation. Another reason for not using values outside this region is the additional computational cost of the algorithm if those frequencies were included. To decrease the effect of noise on the estimate of the distance between frequencies, autocorrelation is performed on the spectrum band window between f min and f max : where A[m] is the autocorrelation, I[m] is the current spectrum between f min and f max , I is the mean value of the current spectrum between f min and f max , K max is the length or number of samples of the spectrum between f min and f max , and m is the discrete index. This autocorrelation formula is unusual because the mean value is previously subtracted from the input. This action eliminates the effect of the mean value in the autocorrelation and it ensures that the autocorrelation ground level will not decrease as the index m is increased. This facilitates the detection of peaks in the autocorrelation signal.
The autocorrelation signal has different peaks that are related to the distance between frequencies present in the current spectrum. For example, the first peak in the autocorrelation indicates the distance between peaks in the spectrum signal, the second is two times this distance, and the third is three times this distance. So the distance between two consecutive peaks is the distance between frequencies in the spectrum. The advantage of using the autocorrelation signal instead of the spectrum is the reduction of noise, and, thus, the improvement of the estimation. This can be seen in Figure 5, which shows the amplitude of the signal autocorrelation obtained according to the proposed method from the current spectrum of Figure 2. The motor speed in this situation is 2400 rpm, and the distance between frequencies in the spectrum is 40 Hz according to Equation (9).
Appl. Sci. 2016, 7, 14 7 of 14 distance between frequencies in the spectrum. The advantage of using the autocorrelation signal instead of the spectrum is the reduction of noise, and, thus, the improvement of the estimation. This can be seen in Figure 5, which shows the amplitude of the signal autocorrelation obtained according to the proposed method from the current spectrum of Figure 2. The motor speed in this situation is 2400 rpm, and the distance between frequencies in the spectrum is 40 Hz according to Equation (9). In the proposed method, instead of using only the first peak to estimate the distance between frequencies, every peak of the autocorrelation signal is used. This increases the precision of the estimation. In addition, the precision of the estimation depends on the spectral resolution, and this resolution depends on . If this parameter is small, the spectral resolution will be bad. To avoid this problem, several peaks are used to estimate this distance. The employed peaks are the peaks between and . For this reason, the distance between and must be enough to contain all the necessary peaks to improve the computation of the distance between peaks. To decrease the noise in the autocorrelation signal and to detect the peaks produced by the motor speed, every sample of the autocorrelation signal is compared to the threshold . If the sample value is lower than , it is set to zero, and if it is higher, it is kept: where is the updated signal. To detect peaks in the autocorrelation, the last signal is derived according to: where is the derivative of the signal. Then, there is a peak if the derivative is negative and its previous value is positive: where is a signal with Boolean values that indicates if there is a peak. This peak detection method alone is not sufficient; it detects not only the peaks produced by the motor speed but also the undesired small peaks produced by noise. For this reason, it is necessary to discard the peaks produced by noise. To do this, the distance between peaks is calculated, and then the statistical mode parameter of these distances is obtained. The distance calculated is a discrete measurement and measures the numbers of samples between peaks.
The mode statistical parameter is used to discard the peaks produced by noise. Every distance calculated is compared to the mode, and if the absolute difference is bigger than the threshold , this distance is discarded and deleted from the list. In the proposed method, instead of using only the first peak to estimate the distance between frequencies, every peak of the autocorrelation signal is used. This increases the precision of the estimation. In addition, the precision of the estimation depends on the spectral resolution, and this resolution depends on T b . If this parameter is small, the spectral resolution will be bad. To avoid this problem, several peaks are used to estimate this distance. The employed peaks are the peaks between f min and f max . For this reason, the distance between f min and f max must be enough to contain all the necessary peaks to improve the computation of the distance between peaks. To decrease the noise in the autocorrelation signal and to detect the peaks produced by the motor speed, every sample of the autocorrelation signal is compared to the threshold A min . If the sample value is lower than A min , it is set to zero, and if it is higher, it is kept: otherwise (11) where A th is the updated signal. To detect peaks in the autocorrelation, the last signal is derived according to: where D is the derivative of the signal. Then, there is a peak if the derivative is negative and its previous value is positive: where D p is a signal with Boolean values that indicates if there is a peak. This peak detection method alone is not sufficient; it detects not only the peaks produced by the motor speed but also the undesired small peaks produced by noise. For this reason, it is necessary to discard the peaks produced by noise. To do this, the distance between peaks is calculated, and then the statistical mode parameter of these distances is obtained. The distance calculated is a discrete measurement and measures the numbers of samples between peaks.
The mode statistical parameter is used to discard the peaks produced by noise. Every distance calculated is compared to the mode, and if the absolute difference is bigger than the threshold d a , this distance is discarded and deleted from the list.
Finally, the mean distance is calculated from the values that have not been discarded. This mean distance is multiplied by the spectral resolution, R spectrum : This new value is the estimation of distance between the frequencies that appear in the current spectrum.

Tracking Frequency Block
The Tracking Frequency block ( Figure 3) tracks a peak in the current spectrum and outputs the frequency of the peak. The block diagram of Tracking Frequency is shown in Figure 6. This scheme is the same as the scheme of a Phase Locked Loop (PLL). There are four elements: the Voltage Controlled Oscillator (VCO), the Multiplier or Phase Detector, the Low Pass Filter, and the Adder. These four elements are the typical elements present in a PLL [32]. Finally, the mean distance is calculated from the values that have not been discarded. This mean distance is multiplied by the spectral resolution, : This new value is the estimation of distance between the frequencies that appear in the current spectrum.

Tracking Frequency Block
The Tracking Frequency block ( Figure 3) tracks a peak in the current spectrum and outputs the frequency of the peak. The block diagram of Tracking Frequency is shown in Figure 6. This scheme is the same as the scheme of a Phase Locked Loop (PLL). There are four elements: the Voltage Controlled Oscillator (VCO), the Multiplier or Phase Detector, the Low Pass Filter, and the Adder. These four elements are the typical elements present in a PLL [32]. The Tracking Frequency block has three inputs: the current, , the central frequency, , and the , and one output: the frequency of the peak that has been found, . When the reset is enabled, the Tracking Frequency block tracks the peak in the spectrum nearest to , and when the reset is disabled, it tracks the peak nearest to the one detected in the previous iteration.
In the Tracking Frequency block, the VCO generates a sinusoidal signal with frequency , that is the frequency of the peak detected in the previous iteration. The Multiplier block multiplies the current by the signal generated by the VCO. The Low Pass Filter gets the dc component and this value is related to the frequency of the peak. The Adder adds to the dc component that was obtained by the Low Pass Filter.
The Low Pass Filter proposed and used in this work has the following transfer function: where τ and τ are the time constants of the filter and is the variable of the Laplace transform. The second part of the transfer function can be implemented digitally. For this work, the integrator 1/ was implemented with the trapezoidal rule as: where is the output of the integrator, is the input, is the present discrete time and is the sample time or the inverse of the sampling frequency.
When the is enabled, the only element that is affected is the Low Pass Filter which is reset to its initial status. In the proposed filter, this is done by resetting the integrator to 0.
This filter creates a PLL of Type II and order 2. Because the Tracking Frequency is like a PLL, full analysis of it can be found in any manual or book on PLLs [32].

Supervisor Block
The Supervisor Block decides whether Estimator Block has to be executed in the next interaction and whether the filter of the Tracking Frequency has to be reset. The Tracking Frequency block has three inputs: the current, i, the central frequency, f 0 , and the reset, and one output: the frequency of the peak that has been found, f m .
When the reset is enabled, the Tracking Frequency block tracks the peak in the spectrum nearest to f 0 , and when the reset is disabled, it tracks the peak nearest to the one detected in the previous iteration.
In the Tracking Frequency block, the VCO generates a sinusoidal signal with frequency f m , that is the frequency of the peak detected in the previous iteration. The Multiplier block multiplies the current by the signal generated by the VCO. The Low Pass Filter gets the dc component and this value is related to the frequency of the peak. The Adder adds f 0 to the dc component that was obtained by the Low Pass Filter.
The Low Pass Filter proposed and used in this work has the following transfer function: where τ 1 and τ 2 are the time constants of the filter and s is the variable of the Laplace transform. The second part of the transfer function can be implemented digitally. For this work, the integrator 1/s was implemented with the trapezoidal rule as: (16) where v is the output of the integrator, u is the input, n is the present discrete time and dt is the sample time or the inverse of the sampling frequency. When the reset is enabled, the only element that is affected is the Low Pass Filter which is reset to its initial status. In the proposed filter, this is done by resetting the integrator to v[n] = 0.
This filter creates a PLL of Type II and order 2. Because the Tracking Frequency is like a PLL, full analysis of it can be found in any manual or book on PLLs [32].

Supervisor Block
The Supervisor Block decides whether d f m Estimator Block has to be executed in the next interaction and whether the filter of the Tracking Frequency has to be reset.
The To obtain these outputs, the Supervisor block compares the frequency, f m , determined by the Tracking Frequency block, with an estimation of this frequency. This estimation is derived from the distance between frequencies, d f m , and the index of the current component used to detect the speed, # f . If the difference between both is not too large, then the outputs ex_d f m and reset are kept. Otherwise, the outputs are updated to the correct values. To decrease the computational cost, this comparison is not made every iteration; instead it is checked every I M iterations.
The block diagram of the supervisor is shown in Figure 7. The inputs are d f m and f m , and the outputs are ex_d f m, f 0 , and reset. The others are parameters of the algorithm. In the diagram, triangles implement arithmetic operations such as subtraction or multiplication. These triangle blocks also implement comparative operations such as "greater than" and "greater than or equal to." When these blocks implement a comparative operation, the output is a Boolean value, True(T) or False(F). Trapezoids are multiplexers and they are controlled by a Boolean input that selects one input or the other, depending on the value of the selected input. Blocks with the symbol Z −1 are delayers. This block delays the input sample by one iteration. The Mean block calculates the average value of the last L samples of d f m according to: The Counter True block counts how many times the input signal has had the value True in the last L samples. If the Boolean value True is replaced by 1 and False by 0, then the output of this block can be calculated according to: The blocks AND and OR are blocks that implement the logical operations with these names. The block with the symbol |·| calculates the absolute value of its input.
Appl. Sci. 2016, 7, 14 9 of 14 The Supervisor block (Figure 3) has two inputs and three outputs. The inputs are the output of the Estimator block, , and the output of the Tracking Frequency block, . The output _ of the Supervisor block indicates if the Estimator block has to be executed in the next iteration. The output determines if the Tracking Frequency block has to be reset and, if so, the output indicates the new central frequency of the Tracking Frequency block. To obtain these outputs, the Supervisor block compares the frequency, , determined by the Tracking Frequency block, with an estimation of this frequency. This estimation is derived from the distance between frequencies, , and the index of the current component used to detect the speed, # . If the difference between both is not too large, then the outputs _ and are kept. Otherwise, the outputs are updated to the correct values. To decrease the computational cost, this comparison is not made every iteration; instead it is checked every iterations. The block diagram of the supervisor is shown in Figure 7. The inputs are and , and the outputs are _ , , and . The others are parameters of the algorithm. In the diagram, triangles implement arithmetic operations such as subtraction or multiplication. These triangle blocks also implement comparative operations such as "greater than" and "greater than or equal to." When these blocks implement a comparative operation, the output is a Boolean value, ( ) or ( ). Trapezoids are multiplexers and they are controlled by a Boolean input that selects one input or the other, depending on the value of the selected input. Blocks with the symbol are delayers. This block delays the input sample by one iteration. The Mean block calculates the average value of the last samples of according to: 1/ The Counter True block counts how many times the input signal has had the value in the last samples. If the Boolean value is replaced by 1 and by 0, then the output of this block can be calculated according to: (18) The blocks AND and OR are blocks that implement the logical operations with these names. The block with the symbol | | calculates the absolute value of its input. According to Figure 7, the input is used only when the Estimator block has been executed in the present iteration, in other words, when the output _ had the Boolean value in the previous iteration. When the Estimator block is not executed, the last value stored by the delayer is used. When is calculated, then the mean value is calculated from the last values of , and the estimation of the position of is also determined. This estimation, , is According to Figure 7, the input d f m is used only when the d f m Estimator block has been executed in the present iteration, in other words, when the output ex_d f m had the Boolean value True in the previous iteration. When the d f m Estimator block is not executed, the last value stored by the delayer is used. When d f p is calculated, then the mean value is calculated from the last L values of d f p , and the estimation of the position of f m is also determined. This estimation, f me is obtained by multiplying d f p by # f . The parameter # f is the position or index of the frequency peak used to detect the speed.
The estimation of f me is not precise enough to be used to calculate the motor speed. For this reason, the Tracking Frequency block is used to improve precision. When f me has been calculated, the distance between f me and f m , named d f a , is calculated. This is done with a subtract block and an absolute value block. The maximum allowable distance between both frequencies, w, is obtained by calculating the mean value of d f p from the last L values, and multiplying this mean value by the parameter p, p being a value between 0 and 1. When d f a and w are calculated, both values are compared and B is calculated. B is a Boolean value that indicates when w is lower than d f a . B indicates if the distance between f m and the estimation is within the allowable distance. B is used to calculate C t according to Equation (18). C t determines how many times the allowable distance between f m and the estimation has been exceeded in the last L iterations. Next, D is calculated. D indicates if D indicates if C t is larger than the maximum allowable number of times the distance can be exceeded, M d . With the values B and D, the reset output is calculated, and it is Ture when both B and D are True. Also, when reset is True, the output f 0 is updated with the f me value. If reset is False, the value of the previous iteration is kept.
The output ex_d f m is calculated with the values B and M i . The output ex_d f m is True when one or both values are True. M i is True when the total of the counter C i is bigger than the maximum, I M. The counter C i is reset to zero when ex_d f m is True, and its count is increased when it is False.
The output ex_d f m is True in two situations: (i) when the distance between f m and the estimation f me is greater than the maximum allowable distance, w; and (ii) when ex_d f m has not been True for the last I M iterations.

Converter
The Converter block (Figure 3) calculates the speed of the brushed dc motor, n, using the frequency f m obtained by the Tracking Frequency block. Both values are related by a linear function according to Equation (9). Because the Tracking Frequency block tracks the component of the current with index # f , the relation between f m and n will be: where n is the motor speed, f m is the output of the Tracking Frequency block, and # f is the index of the current component used to detect the motor speed.

Experimental Validation
This section describes the experimental procedure for validating the proposed method of motor speed detection.

Description of the System
The system used to measure the accuracy of the proposed method was composed of a brushed dc motor, a current sensor, a data acquisition card, and a computer. Figure 8 shows the experimental setup. obtained by multiplying by # . The parameter # is the position or index of the frequency peak used to detect the speed. The estimation of is not precise enough to be used to calculate the motor speed. For this reason, the Tracking Frequency block is used to improve precision. When has been calculated, the distance between and , named , is calculated. This is done with a subtract block and an absolute value block. The maximum allowable distance between both frequencies, , is obtained by calculating the mean value of from the last values, and multiplying this mean value by the parameter , being a value between 0 and 1. When and are calculated, both values are compared and is calculated. is a Boolean value that indicates when is lower than .
indicates if the distance between and the estimation is within the allowable distance.
is used to calculate according to Equation (18). determines how many times the allowable distance between and the estimation has been exceeded in the last iterations. is when the total of the counter is bigger than the maximum, . The counter is reset to zero when _ is , and its count is increased when it is . The output _ is in two situations: (i) when the distance between and the estimation is greater than the maximum allowable distance, ; and (ii) when _ has not been for the last iterations.

Converter
The Converter block (Figure 3) calculates the speed of the brushed dc motor, , using the frequency obtained by the Tracking Frequency block. Both values are related by a linear function according to Equation (9). Because the Tracking Frequency block tracks the component of the current with index # , the relation between and will be: where is the motor speed, is the output of the Tracking Frequency block, and # is the index of the current component used to detect the motor speed.

Experimental Validation
This section describes the experimental procedure for validating the proposed method of motor speed detection.

Description of the System
The system used to measure the accuracy of the proposed method was composed of a brushed dc motor, a current sensor, a data acquisition card, and a computer. Figure 8 shows the experimental setup.  A universal machine set, H-REM-120-CM Universal Laboratory Machine (ULM) from Hampden ® Engineering Corporation (East Longmeadow, MA, USA), was used for the tests. This machine set is coupled with a swinging frame dc dynamometer. The universal machine stator is composed of 24 slots with 12-turn coils. The rotor of the universal machine is a 36-slot rotor with a two-pole, full-pitch dc winding composed of 72 four-turn coils connected to 72 commutator segments. This machine can be connected in many different configurations, such as in single-phase induction, three-phase induction, synchronous, and a dc machine with series or shunt excitation. For this work, the machine was connected with the topology of a brushed dc shunt motor. In this configuration, the motor has a rating of 1 kW at 110 V.
The current sensor used was an AYA IBP 200:1 (Pulse Electronics, San Diego, CA, USA). This sensor has a current transformer (CT) connected to a 2 Ω precision resistor (Caddock, Roseburg, OR, USA). The resistor leads convert the current to a voltage signal in order to be able to input it into the data acquisition system. The current sensor was connected to the armature circuit near the motor brushes, as Figure 8 shows. Note that only the armature current was measured. A current transformer was intentionally selected because it does not transform the dc current. This selection provides better precision in the measurement of the ac component. The data acquisition card used was a NI USB-6356 from National Instruments (Austin, TX, USA). It has eight simultaneous analog inputs at a sample rate of 1.25 MS/s/ch, two analog outputs at 3.33 MS/s, and 24 digital I/O. One analog input was connected to the current sensor. The data acquisition card was connected to a computer.
The computer used was an ASUS Notebook K72Jk Series (Taipei, Taiwan) with an Intel ® Core™ i3 CPU M350 processor (Santa Clara, CA, USA), 4 GB RAM, and a 500 GB hard disk. The operating system was Windows 7, and the development environment was LabVIEW 2010 from National Instruments (Austin, TX, USA). The computer was configured to work in soft real time, and the data acquisition card was configured to acquire samples in a continuous mode.
It was necessary to measure the actual speed to compare the accuracy of the proposed method. The actual speed was measured with an encoder. The encoder used was a Monarch Instrument ACT 3 Tachometer/Totalizer/Ratemeter (Amherst, NH, USA). This encoder was configured to output an analog voltage proportional to the motor speed. The offset value and full scale speed values of the encoder were programmed to values close to the motor operating speed to achieve high resolution in the speed measurement. The encoder and its connections are not included in Figure 8.

Data Collection
The motor was monitored in various situations to evaluate the accuracy of the proposed method. As previously described, measurements included the armature current and the real speed of the motor. The sampling rate was 100,000 samples per second (per channel) in continuous mode, T b was one second and the employed window was bounded by f min = 1000 Hz and f max = 5000 Hz.
Three tests were performed in different operating modes: constant-speed, slowly changing speed, and rapidly changing speed. The first test involved testing 12 different constant speeds between 2000 and 3000 rpm. This speed range was selected because this is the operating range of the tested motor. The second test consisted of slowly changing the motor speed from 2000 rpm to 2900 rpm. The third test consisted of abruptly changing the speed from 2300 rpm to 2400 rpm. Motor speed changes were accomplished by changing the motor load and/or the field current.
For the three tests, the mean error and the standard deviation of the error were computed, both in absolute value (rpm) and in relative value (%).

Comparison of the Predictions with the Measurements
The results of the first test, the constant-speed test, are shown in Table 1. This table contains, for the twelve tested speeds, the speed of the motor measured by the tachometer and the error in the speed estimation. The average error and the standard deviation error were less than 1 rpm, and their relative values were less than 0.01%.
The results of the second test, the slowly changing speed test, are shown in Figure 9. The figure shows the real speed versus its estimation, and its error. The mean error during this test was 0.2863 rpm and the standard deviation error was 1.2670 rpm.
The results of the third test, the rapidly changing speed test, are shown in Figure 10. The figure shows the real speed versus its estimation, and its error. The mean error during this test was 0.6658 rpm and the standard deviation error was 1.1484 rpm. The results of the second test, the slowly changing speed test, are shown in Figure 9. The figure shows the real speed versus its estimation, and its error. The mean error during this test was 0.2863 rpm and the standard deviation error was 1.2670 rpm.
The results of the third test, the rapidly changing speed test, are shown in Figure 10. The figure shows the real speed versus its estimation, and its error. The mean error during this test was 0.6658 rpm and the standard deviation error was 1.1484 rpm.   The three tests at constant-speed, slowly changing speed, and rapidly changing speed, performed between 2000 and 3000 rpm, showed an average error less than 1 rpm and a standard deviation error less than 1.5 rpm. These results indicate that the proposed method works correctly for constant speeds, slowly changing speeds, and rapidly changing speeds. The results of the second test, the slowly changing speed test, are shown in Figure 9. The figure shows the real speed versus its estimation, and its error. The mean error during this test was 0.2863 rpm and the standard deviation error was 1.2670 rpm.
The results of the third test, the rapidly changing speed test, are shown in Figure 10. The figure shows the real speed versus its estimation, and its error. The mean error during this test was 0.6658 rpm and the standard deviation error was 1.1484 rpm.   The three tests at constant-speed, slowly changing speed, and rapidly changing speed, performed between 2000 and 3000 rpm, showed an average error less than 1 rpm and a standard deviation error less than 1.5 rpm. These results indicate that the proposed method works correctly for constant speeds, slowly changing speeds, and rapidly changing speeds. The three tests at constant-speed, slowly changing speed, and rapidly changing speed, performed between 2000 and 3000 rpm, showed an average error less than 1 rpm and a standard deviation error less than 1.5 rpm. These results indicate that the proposed method works correctly for constant speeds, slowly changing speeds, and rapidly changing speeds.

Conclusions
This paper has presented a new sensorless method to estimate the speed of brushed dc motors with a large number of coils, such as in integral horsepower brushed dc motors. The method has the following features: (1) It is a novel method that cannot be classified in any of the previous existing sensorless groups; it cannot be classified in either the group of methods based on the dynamic model or the group of methods based on the ripple component. It belongs to a new sensorless group that studies the spectral components of the current and has the advantages of both existing groups. (2) It requires only the measurement of the current of the brushed dc motor for speed estimation.
In contrast, other methods for brushed dc motors with a large number of coils require the measurements of both current and voltage. (3) It can be used for brushed dc motors with a large number of coils, such as integral horsepower brushed dc motors. In contrast, other methods based on the ripple component that only measure the current can only be used in brushed dc motors with a low number of coils where the ripple component is big enough. (4) It achieves a low error in speed estimation in the performed tests. Its average error is less than 1 rpm and the standard deviation error is less than 1.5 rpm for speeds between 2000 and 3000 rpm for an H-REM-120-CM motor configured as a brushed dc motor with shunt configuration.