Sensorless Speed Control of Brushed DC Motor Based at New Current Ripple Component Signal Processing

Signal processing of the brushed DC motor current was developed in this paper to obtain information about a rotor speed from a measured motor current. The brushed DC motor current contains a signal with a frequency proportional to the rotor speed. This signal is the outcome of a commutation process occurring in the brushed DC motor, and it is called a ripple component. Since the number of ripples in the measured motor current per one rotation is constant, the rotor speed can be estimated. A discrete bandpass filter with a floating bandwidth was developed as the main part of signal processing. This new interpretation of the bandpass filter was used to extract a frequency of the ripple component from the measured motor current. This frequency was used to acquire information about the estimated rotor speed. The estimated speed was set as a feedback value to a cascade control structure to provide sensorless speed control. The advantages and limitations of this approach are presented in this paper. Based on simulations and experimental results, it was confirmed that the proposed sensorless speed control is robust, accurate, and works precisely in a wide range of speeds.


Introduction
The advancement of technology and automation has led to the widespread use of electric motors in many applications. Brushed DC motors are used in various industrial sectors and a wide range of consumer products such as pumps, air fans, and so on. These drives are also commonly used in the automotive industry, as automobile starters, window lifters, windshield wipers, etc. However, brushed DC motors require more attention to maintenance due to the commutator and brushes. The mechanical commutator is the most vulnerable component and the main practical problem of these motors. This component may also limit the maximum speed of the DC motor due to its mechanical endurance. A mechanical sensor coupled to a motor shaft is required to obtain information about the speed or position of the motor. Sensors such as the resolver, encoder, Hall effect sensor, and tachometer are commonly used. However, the overall cost of a DC drive system increases significantly with the addition of such a sensor, which is prone to failure in industrial environments. The sensor reliability is remarkably affected by environmental conditions that the sensor is exposed to, such as dust, pollution, vibrations, and temperature. A sensorless speed or position estimation can be used to minimize the cost and issues associated with the sensors in a DC drive system. The main advantages of the removal of such sensors and using a sensorless algorithm are decreased maintenance, decreased drive volume, a reduced number of connections, and a reduced cost of the final system. The sensorless algorithms are also used as a redundant solution in case of a sudden failure of the mechanical sensor. These algorithms can be divided into two groups: those based on the dynamic model of the DC motor and those based on the ripple component of the motor current.
The methods based on the dynamic model of DC motor depend on the parameters of the brushed DC motor such as the resistance, inductance, and back-emf constant. However, these parameters are not constant, and they vary under different operational conditions, for example, with temperature. Varying parameters then lead to uncertainty in speed estimation. Nevertheless, these parameters can be estimated dynamically [1], but this approach usually leads to a nonlinear model, which is more difficult, and increased computational time is required. Some techniques indirectly model a motor with the use of neural networks [2] or the Kalman filter [3]. The combination of neural networks and Sliding mode control was used in [4]. Sensorless speed control for very small, brushed DC motors with an adaptive estimator was presented in [5].
The methods based on the ripple component of motor current do not require any knowledge of motor parameters to obtain information about the rotor speed because the motor current already contains this information. The measured motor current is mainly composed of two components: a DC component and an AC component, also known as the ripple component. The DC component is responsible for providing torque to the motor, and its amplitude depends on a motor load. The AC component is created by converting the DC current supplied by a stationary source into an AC current in an armature coil by the commutator and brushes. It should be noted that the AC component contains a ripple, which is directly proportional to the rotor speed. According to the fact that the number of ripples in the measured motor current per one rotation is constant, the rotor speed can be estimated. There are some methods that use the ripple component of the brushed DC motor to estimate the rotor speed.
An adaptive filter was used to estimate the rotational speed in [6], specifically Adaptive Line Enhancer (ALE). Simulation studies of the ALE are presented within the paper but without experimental verification. The authors stated in the paper that they would like to examine the range and the accuracy of the estimated speed as well as the load effect in practice.
The support vector machines were applied in [7], where the rotor speed was estimated by using the inverse distance between the detected pulses, and the position was estimated by counting all detected pulses. The paper shows good results, but there is no explanation for why the results were not presented for the low speeds, specifically under 501 rpm. In the paper, a response of the proposed method to the applied load is not available either. The paper presented an interesting sensorless method with speed detection from ripple current but without controlling the speed. The complexity of the proposed method also requires a microcontroller with higher computational power, due to plenty of mathematical operations.
The method based on measuring the inductive spikes generated when the motor is turned off was proposed in [8]. The estimated speed was used as a feedback value to the speed controller, while the speed was measured in steady state. The authors declare that it would be of great interest to have an analysis of dynamic behavior and how to optimize a speed controller.
Another approach [9] used the spectral components of the motor current. This method is also useful for the brushed DC motors with a large number of coils where the ripple component is almost negligible. The proposed method was tested within a small speed range, specifically from 2000 rpm to 3000 rpm, without a control structure. The proposed method contains a lot of mathematical operations, which could lead to higher computational requirements.
Texas Instruments made an application note [10] where an analog bandpass filter was used to count ripples in the form of pulses, which requires the use of additional hardware. This approach used the pulse counting technique without controlling the motor speed or position.
Microchip made a similar application note [11], where a ripple counting technique was proposed. They also provide a software implementation of the proposed sensorless method to the microcontroller unit. The main goal of this counting implementation is to count all the ripples until the number of expected ripples is reached. This approach is very suitable to control the motor position by counting pulses. However, a way to control the rotor speed was not the scope and purpose of the application note, so it was not presented.
In [12], the comparison between the model-based and non-model-based methods is presented. The model-based methods experimentally verified in this article are specifically the pseudo-sliding mode observer and the observer with a PI controller. However, limited accuracy was detected for these methods. According to this fact, they were compared to the non-model-based method, which is deeply investigated in this article.
The above-mentioned methods have shown some advantages and disadvantages. The main idea of this paper is to provide low-cost sensorless speed control of brushed DC motor independent of the motor parameters. In the above-mentioned methods, there was not a clear statement about the motor operation at low speeds. This article provides an analysis of the proposed sensorless method in the whole speed range. The method of optimizing the controllers will be also revealed, as well as a detailed analysis of the ripple occurrence in the brushed DC motor current. The main parts of the current ripple signal processing are composed of a discrete bandpass filter with floating bandwidth, discrete comparator, and timer peripheral on the microcontroller unit. The discrete bandpass filter with floating bandwidth as well as the discrete comparator will be used to perform the conversion of the ripple current to the pulses. Afterward, pulses will not be counted, but their length will be measured with a timer peripheral to estimate the rotor speed. The estimated speed will be used as a feedback value for a speed controller. The cascade control structure with the speed and current controller is used to provide sensorless speed control.

Ripple Component of Brushed DC Motor Current
In this section, the dynamic model of the DC motor with the mathematical expressions is given. Moreover, the reason standing behind the presence of ripple in the measured brushed DC motor current will be presented as well as the analysis of the ripple component in time and frequency domain.

Dynamic Model of DC Motor
The system structure of the DC motor is depicted as employing an equivalent circuit in Figure 1, including the armature resistance and the armature inductance . The equivalent circuit shows the conversion between the electrical and the mechanical power. In this figure, the armature current is flowing. This current produces the electromagnetic torque necessary to rotate the mechanical load at the angular velocity of . Across the armature terminals, the rotation at the speed of induces a voltage called the back-emf . On the electrical side, the armature voltage overcomes the back-emf and causes the current to flow. As the current flows across the armature winding resistance and the armature winding inductance, the equation for the electrical side of the DC motor with the use of Kirchhoff's voltage law can be written as follows: (1) The back-emf is proportional to the angular velocity of the rotor, expressed as: (2) where is the back-emf constant. On the mechanical side of the DC motor, the electromagnetic torque produced by the motor overcomes the load torque to produce acceleration. The equation for the mechanical side is shown as: where is the total effective value of the combined inertia of motor and the inertia of the mechanical load . The electromagnetic torque is proportional to the armature current, which yields to the following equation: (4) where is the motor torque constant, which is the same as the back-emf constant. Equations (1)-(4) are the basic equations of the DC motor related to the equivalent circuit in Figure 1. It should be noted that the equations of the electrical and mechanical system are coupled. The back-emf in the electrical system equation depends on the mechanical speed and the electromagnetic torque in the mechanical system equation depends on the electrical current. The electrical power absorbed from the electrical source by the motor is converted into mechanical power and vice versa. In steady state, when the voltage is applied, the voltage drop across the armature winding inductance is no longer considered, and the following equations for the armature current and the angular velocity of the rotor are derived: To investigate the dynamic behavior of DC motor it is necessary to express the motor equations as a system of differential equations: According to these equations, a block diagram including both the electrical and mechanical system of DC motor is established and shown in Figure 2. However, the dynamic model of the DC motor as shown in Figure 2, does not include the effect of the commutation, and the current ripple is not presented. The current ripple gives an insight into a commutation process occurring in the brushed DC motor. To understand the presence of the current ripple, the principle of the commutation process will be introduced.

Commutation Process of Brushed DC Motor
Considering the elementary brushed DC motor with four commutator segments and two brushes, as illustrated in Figure 3, the commutation process will be divided into three intervals based on the mechanical position of the rotor . In the first interval (Figure 3a), the current flows across the brush with a positive power supply and both parallel circuits to the brush with a negative power supply. The next interval occurs when the brushes short-out two adjacent commutator segments (Figure 3b), which results in the current circulating between the segments. These two segments are interconnected with the one armature coil represented by the inductance. When the adjacent commutator segments are shorted out, it will lead to a short-circuit of the corresponding armature coil, with no current flowing through it. When this situation occurs, the inductance is no longer part of the circuit, which leads to a reduction of the armature impedance, thus causing the overall current to rise and create the current ripple. In this region, the corresponding coil undergoes commutation, where its current direction reverses as the rotor turns further. After a sudden shorting out, the last interval occurs. In the last interval (Figure 3c), the circuit is composed of four coils again, thus a larger impedance, which leads to the sudden decrease of the current, and the ripple component is presented. The periodic shifting of coils under the brushes, as the rotor turns, produces the periodic current ripple, which is proportional to the rotor speed. According to the fact that the number of ripples in the current per one rotation is constant, the speed of the brushed DC motor can be estimated. There is also another case when the influence of commutation on the motor current is slightly different. The previous case was focused on the machine with an even number of commutator segments. There are some differences when the number of commutator segments is odd. The principle will be shown in Figure 4 when the brushed DC motor with three commutator segments is illustrated. The commutation process will be divided into three intervals based on the mechanical position of the rotor. The principle is similar to the previous case. The difference between these two cases can be seen if we compare Figure 3b with Figure 4b, which is the interval when some of the armature coils are short-circuited. During this interval in Figure  3b, armature coil 1 and the opposite armature coil 3 are short-circuited, while in Figure  4b, there is just one armature coil to be short-circuited because there is no coil on the opposite side. The important fact is that armature coil 1 in Figure 4b will be also shorted-out by a second brush, thus providing two ripples per one mechanical rotation, while armature coil 1 in Figure 4a is in opposite with armature coil 3 and the ripples produced by these two coils will be counted into one ripple. According to these facts, the brushed DC motor in Figure 3 with an even number of commutator segments will create four ripples per one mechanical rotation, while the motor in Figure 4 will create six ripples per one mechanical rotation. The number of ripples per one mechanical rotation can be calculated by the following equation: where is the coefficient contingent to the parity of the number of commutator segments , with 1 when is even and 2 when is odd and is the number of pole pairs.
When comparing these two types of constructions concerning the number of commutator segments, the following statements for the odd number of segments are given:  produce twice as many ripples;  decrease the length of a commutation interval;  current flowing into the commutator will not divide evenly into the parallel circuits;  produce the ripples with a smaller amplitude.
It is worth mentioning, that the ripple in the current can be also reduced by increasing the number of coils and slots. This fact yields to the following statement. The brushed DC motors with a small number of coils and commutator segments have a significant ripple in the motor current. Otherwise, the brushed DC motor with a large number of coils and commutator segments has a very small ripple. In other words, the motor current just consists of the DC component. This leads to very difficult processing of such a small signal to correctly estimate the rotor speed from the measured brushed DC motor current. Figure 5 shows the measured motor current of the brushed DC motor. This motor will be used for the experimental verifications. The current was measured with a current probe on an oscilloscope. The figure shows the comparison between measured motor current with pulse width modulation (PWM), which affects the current ripple with higher harmonics and without PWM modulation at a rotational speed of 3000 rpm. The figure also illustrates when the rotor reaches one mechanical rotation. This information can be determined by knowledge of the motor parameters related to the commutation process. These are presented in Table 1. As we can see from the picture, one mechanical rotation is given by eight ripples in the motor current. The distance between the first and the last ripple is about 0.02 s. Having this information, the rotational speed can be calculated by the following equation: 60 60 0.02 3000 (10) To extract information about the rotor speed from the measured motor current (Figure 5), it is necessary to know the exact frequency of the current ripple. The frequency of the current ripple can be calculated by the following equation from [13]: where is the rotational speed. Equation (11) yields that, for determining an accurate value of the current ripple frequency, it is necessary to know the number of commutator segments and number of pole pairs. These parameters are constant, and they depend on the motor construction, thus they are not changing during motor operation. Assuming the parameters of the brushed DC motor from Table 1 that are used to perform an experimental verification and the rotational speed calculated by Equation (10), we will obtain the following frequency of the current ripple: By performing Fast Fourier Transform (FFT) of motor current with PWM at a given speed, the frequency of current ripple is presented in a frequency domain as calculated (Figures 6 and 7):

Proposed Sensorless Method
This section presents the non-model-based sensorless method used to estimate the speed of the brushed DC motor from the measured motor current. The purpose of employing the non-model-based method is to have a parameter-independent method which is accurate, simple to implement, and does not have large computational requirements. In this method, it is necessary to know the exact frequency of the current ripple to extract information about the rotor speed from the measured motor current. It is clear from Equation (11) that the frequency of the current ripple is proportional to the rotor speed and therefore changes in the frequency domain. This frequency can be extracted by the discrete bandpass filter, which is used for eliminating the DC component with frequency , the PWM component with frequency , and the other spectral components from the motor current. A bandwidth of the bandpass filter has to be chosen appropriately to eliminate frequencies, which are not coupled to the rotor speed.
The first option is to use a wide bandwidth, with the bottom and top cut-off frequencies and , respectively ( Figure 8). The purpose of this approach is to cover an area of the ripple component for the lower rotational speed and the higher rotational speed . However, this may lead to uncertainties in speed estimation because the ripple component coupled to the rotational speed is influenced by the other spectral components with smaller amplitude, as can be seen practically from the FFT in Figure 6. This approach can be performed either externally with the analogue bandpass filter or internally by the discrete bandpass filter. The second option is to use a narrower bandwidth whose position is floating in the frequency domain according to the required rotor speed (Figure 9). Therefore, the ripple component at rotational speed or no longer contains most of the other spectral components, which are not corresponding to the rotor speed, and the speed can be estimated more accurately. This approach can be performed only by the discrete bandpass filter, which allows for appropriate bandwidth variation according to the rotor speed. The bandwidth variation is provided by means of the offline precalculated coefficients of the discrete bandpass filter. The coefficients can be calculated with the following MATLAB function: which returns the transfer function coefficients for the filter, for example, lowpass, highpass, bandpass, or bandstop. The resulting bandpass and bandstop designs are of order 2 with normalized cut-off frequency . Solving Equation (13) for a given type of filter and cut-off frequency will produce five coefficients: , , , , . These coefficients can be implemented into a microcontroller unit with the polynomial approximation or Look-up-table (LUT). In this paper, polynomial approximation was used, yielding lower computational requirements. The output of the bandpass filter then provides a clean AC signal, which corresponds to the actual rotor speed. This signal is compared to a reference value to convert the ripples to pulses with a frequency equal to the frequency of the current ripple. The timer peripheral on a microcontroller unit is used to measure the length of each pulse, and the rotor speed can be estimated. The processing of the ripple current is performed by the microcontroller unit, thus without the use of any external components. The conversion of the measured motor current to the pulses is shown in Figure 10. The block diagram of the current signal processing is presented in Figure 11 and the corresponding flowchart in Figure 12 Figure 10) were measured by a real-time debug monitor and the data visualization tool FreeMASTER. This tool has a limit for the number of recorded samples, so the high-frequency signal from PWM, as it is visible in Figure 5, is not presented in Figure 10.

Simulation Studies
In this section, the proposed non-model-based sensorless method will be simulated. The motor parameters which are mandatory to perform simulation tests were calculated based on the experimental procedures. These parameters are provided in Table 2. The parameters of a cascade control structure, which consists of PI controllers, will be also calculated in this section.

Current Loop
In order to obtain a transfer function for the electrical part of the DC motor, it is necessary to perform the Laplace transform of Equation (1) and express the armature current as follows: where is the rotor gain and is the rotor time constant: 1 By neglecting the second part of Equation (14), which is the influence of the backemf, the transfer function for the electrical part of the DC motor in the Laplace domain is given as: This transfer function is a part of Figure 13, where a current loop including the PI controller is presented. The PI controller in the current loop is forcing to zero the error between the required armature current * and the actual armature current . The output of this controller, also known as a current controller, provides information about the required armature voltage * .  where is the time constant of the current controller. According to the inverse dynamics method, the following condition is applied , which yields to the resulting open current loop transfer function: By applying Mason's rule, a closed current loop transfer function is derived as: The current loop will be replaced by 1st order transfer function with the time constant , which is equal to: The integral gain of the current controller can be calculated as: The natural frequency of the current loop can be defined by Dodds's formula: where is the order of the system. Considering the discrete domain, the expressions for controller gains will change as follows: where is the sampling period of the current loop. The calculated parameters for the current loop can be found in Table 3.  Figure 14, the comparison between the measured and simulated current is shown. The comparison was made for a step change from 0 A to 6 A with the settling time of the current loop equal to 0.05 s. It is worth mentioning that the settling time for the current loop can be much smaller, approximately about 0.005 s, but for the proposed sensorless method, the bandwidth of the PI controller has to be limited to not affect the ripple in the measured current. Figure 15 shows the Bode plot of the current loop, which expresses the magnitude and phase shift of the frequency response. The comparison between results from the simulation and measurement are presented. The dashed line in the figure shows the natural frequency of the current loop which is 60 rad/s.

Speed Loop
The parameters of the speed controller will be calculated according to the block diagram in Figure 16, where the current loop is replaced with the 1st order transfer function with the time constant . The PI controller in the speed loop is forcing to zero the error between the required rotor speed * and the actual rotor speed . The output of this controller provides information about the required armature current * . The open speed loop transfer function can be written according to the block diagram in Figure 16: By applying Mason's rule, a transfer function of the closed speed loop is presented as: The resulting closed speed loop can be obtained by adjusting Equation (28) to the form: However, the speed controller introduced a zero to the closed-loop transfer function for command changes, located at the numerator of Equation (29). This derivative characteristic of the loop increases the system overshoot, lowering the potential closed-loop bandwidth. Due to this, the zero of the speed controller must be compensated. This can be done by introducing a zero-cancellation block, which has the following transfer function: The zero-cancellation block physically behaves as a low pass filter, smoothing the input command. It therefore allows for increasing of the loop gain, achieving a higher bandwidth. The speed loop transfer function with the zero-cancellation block in feed-forward is then: The block diagram of the speed loop with the zero-cancellation is shown in Figure  17. Having the closed loop with a canceled zero (Equation (31)), the parameters of the speed controller can be calculated by exploiting a pole placement method. A pole placement method is an approach of a feedback control system theory to place the closed-loop poles of a plant in predetermined locations. The pole placement method applied to the closed-loop system leads to desired controlled system behavior. The parameters are designed by comparing the characteristic polynomial with that of a standard third-order system, as follows: where is the loop attenuation. The settling time of the speed loop can be defined by Dodds's formula: The proportional gain of the PI controller can be therefore calculated by the following equation:

2
(34) and the integral gain: where is given from Equation (32): Considering the discrete domain, the expressions will change as follows: where is the sampling period of the speed loop. The parameters of the current controller will be recalculated concerning the time constant obtained from Equation (36). The calculated parameters for the speed loop can be found in Table 4. In Figure 18, the comparison between the measured and simulated speed is shown. The comparison was made for a speed step change from 0 rpm to 3000 rpm with the settling time of the speed loop equal to 0.4 s. Figure 18. Comparison between the measured and simulated speed, with a required speed of 3000 rpm.
It should be noticed that the current loop is faster than the speed loop. This can be done because, in most cases, the electrical time constant of the motor is much smaller than the mechanical time constant of the motor and so the small electrical time constant requires the current control loop to run at a higher sampling frequency. On the contrary, the speed loop regarding the higher time constant can run in a slower control loop with a lower sampling frequency. Such an approach provides enough time to control the current between two speed samples. Figure 19 shows the Bode plot of the speed loop, where the comparison between the results from simulation and measurement are presented. The dashed line in the figure shows the natural frequency of the speed loop, which is 15 rad/s.  The block diagram includes three main parts where the first part is a control structure, which is composed of the zero-cancellation block, the speed controller, and the current controller. The second part is the proposed sensorless method, which was introduced in Section 3 and represented with a block diagram in Figure 11. The last part is the dynamic model of the DC motor is a second-order linear system. The more detail-enriched model considering nonlinearity effects, such as the cogging torque and streback effect, is presented in [14].

Sensorless Speed Estimation
As was already mentioned, the dynamic model of DC motor, as illustrated in Figure  2, does not include the effect of commutation. One of the solutions for how to include this effect and perform the simulation is to inject a periodic signal with the exact frequency of current ripple into the motor current. The frequency of this signal will change with the rotor position. This effect is included in the block diagram with a block named ripple. After this injection, the simulation of the proposed sensorless method can be performed according to the block diagram. Figure 21 shows the results obtained from the simulation model for a speed step change from 0 rpm to 3000 rpm. There is a comparison between the required rotor speed * , actual rotor speed and estimated rotor speed . The simulation results show a good match between the speed obtained from the dynamic model and the estimated speed from the proposed sensorless method. The parameters of the speed and current controller were set according to Table 4.

Experimental Results
The tests were performed on the 3-phase low voltage power stage controlled as a full bridge DC/DC converter with apparent power up to 420 VA. The nominal apparent power and nominal current of the power stage are 300 VA and 20 A, respectively. The power stage was made by the author for the dual-motor control applications. However, as Table  2 yields, the no-load current of the experimental motor is 1.2 A. It has to be pointed out that the apparent power of 300 VA is just the nominal value of the power stage, but not the nominal power of the experimental system. The brushed DC motor with a stationary magnetic field generated by permanent magnets was used for the experiments. The motor parameters are given in Table 2. As the microcontroller unit, a S32K144EVB from NXP Semiconductors was used, which is a low-cost evaluation and development board for general purpose automotive applications. The S32K144EVB is based on the 32-bit Arm ® Cortex ® -M4F S32K14 and offers a standard-based form factor compatible with the Arduino ® UNO pin layout, providing a broad range of expansion board options for quick application prototyping and demonstration. The communication between S32K144EVB and PC is provided by serial and debug adapter OpenSDA. It secures a bridge between PC and the embedded target processor, which can be used for debugging, flash programming and serial communication. The control algorithm was created in the S32 Design Studio for Arm ® , which is a complimentary Integrated Development Environment (IDE) for automotive and ultra-reliable Arm-based microcontrollers that enable editing, compiling, and debugging of designs. The current was measured on the low voltage power stage by the 5 mΩ shunt resistor with the sampling frequency equal to 20 kHz. An incremental encoder with 2048 pulses per one rotation was attached to the motor shaft to provide reliable information about the actual rotor speed. The oscilloscope Tektronix TDS 2022B was used to provide motor current figures with a high number of samples. The speed data was measured by a real-time debug monitor and data visualization tool FreeMASTER. The photo of an experimental setup is shown in Figures 22 and 23.   Figure 24 shows the comparison between the actual and estimated rotor speed for a speed step from 0 rpm to 3000 rpm, and Figure 25 shows the error between these speeds.  A motor start-up was provided in the open loop. At the speed of 700 rpm, the estimated speed was set as a feedback value to the speed controller. This method is not suitable for speeds below 700 rpm, which is the main limitation of this method. The reason is that below this speed, the frequency of the current ripple is small enough. Therefore, the control algorithm does not have enough information about the rotor speed from the measured current to provide reliable speed control. It can be compared to a sensor having a low number of references about the rotor speed per one rotation. The value of the threshold speed for controlling the motor speed appropriately depends on the motor construction parameters from Equation (9). For example, motors with a larger number of commutator segments provide enough information about the rotor speed also at the low speeds. That is due to the higher frequency of the current ripple. However, as was already mentioned in Section 2, a larger number of commutator segments will lead to a smaller amplitude of the current ripple, which may lead to more difficult signal processing. Figure 26 shows the comparison between the same speeds, but for stepped changes of required speed from 0 rpm to 6000 rpm. Switch to the proposed sensorless method As in the previous case, the estimated speed was set as a feedback value at 700 rpm. This test was performed to show the accuracy of the proposed method for a wide speed range. The error between the actual and estimated speed is shown in Figure 27, where the mean value of the error is about 1.907 rpm, which is 0.032%. According to the results obtained from Figures 26 and 27, it can be said that this method works accurately in a tested speed range, which was from 700 rpm to speed 6000 rpm. The tested range presents 88.333% of the whole speed range. It is worth mentioning that this method has the potential to work also for very high-speed DC motors. At very high speeds, the number of ripples per one rotation is adequate to control the motor speed. One can observe that the ripple of the estimated speed is increasing with a higher rotational speed. This phenomenon is a result of the DC motor nonlinearities. In the higher speeds, there are frequencies, which are very close to the frequency of the current ripple related to the commutation process. As a result, the output of the discrete band-pass filter is not a clean AC signal. According to this fact, pulses created by the comparator will have different lengths. These lengths are measured by the timer, leading to the presence of the ripple in the estimated speed. However, it is possible to reduce the ripple in the estimated speed by choosing the smaller bandwidth of the proposed filter. Nevertheless, it is not a necessary condition because the ripple is not presented in the actual rotor speed, measured by the mechanical sensor, due to the PI controllers located in the cascade control structure. The PI controller acts as a filter, which is eliminating the ripple from the feedback estimated speed. Figures 28 and 29 reveal that the proposed sensorless method also works correctly under load conditions. During the motor operation, a load of 0.002 Nm was applied to the rotor shaft. It shows the robustness of the proposed sensorless method against step change of the load torque. The proposed sensorless method works even better under load conditions due to the current ripple resolvability (Figure 30). This figure shows the motor current at three different load conditions. It can be seen from the figure that with the higher applied load, not just the amplitude of the DC component is increased but also the amplitude of the presented AC component due to the commutation process. Most of the motors are used in applications where the load is coupled to the rotor shaft or its value changes during motor operation. According to this fact, the proposed sensorless method is suitable for such applications. The experimental motor is primarily used for window lifter applications in the automotive sector, where the Hall effect sensor is used as a mechanical sensor. The applications where the proposed sensorless approach would see a real benefit in the case of speed control are applications such as pumps, fans, and so on. The position control with the proposed sensorless approach could expand an application area to the automotive industry in applications such as window lifters, seat positioning, sunroofs, and so on. Figure 31 shows the Bode plot of the speed loop for sensor-based and sensorless control with a very good match. The results were compared to the ideal transfer function from the simulation. The dashed line in the figure shows the natural frequency of the speed loop, which is 15 rad/s in both cases.

Conclusions
Signal processing of the brushed DC motor current was developed and presented in this paper. This method used the ripple component of the brushed DC motor current to estimate the rotor speed. The discrete bandpass filter with the floating bandwidth, discrete comparator, and timer peripheral on the microcontroller unit were used to extract information about the rotor speed from the motor current. The experimental verification of the proposed sensorless method was performed and compared to the simulation. The accuracy of the proposed sensorless method was investigated, where the error between the actual speed obtained from the mechanical sensor and the estimated speed obtained from the proposed sensorless method was about 0.032%. However, this sensorless method also has some limits. The first limit lies in the control dynamics, where the bandwidth of the current controller had to be limited to not affect the ripple in the motor current. The second limit lies in the incapability of the proposed structure to control the rotor speed at low speeds. The threshold speed depends on the motor construction. It is specifically on the number of commutator segments, their parity, and the number of pole pairs. The value of the threshold speed for the motor used in this study was approximately 700 rpm. Nevertheless, this sensorless method works accurately and precisely in a wide speed range, which is from 700 rpm to 6000 rpm. This range presents 88.333% of the whole speed range. Therefore, this sensorless method can be used as a redundant solution in case of a sudden mechanical sensor failure in DC drives, where the operational speed is higher and the system requires accurate and reliable information about the rotor speed. Funding: This research was funded by the Slovak Scientific Grant Agency VEGA for project support 1/0795/21 and by projects cofunded from EU sources and the European Regional Development Fund and by the Operational Program Integrated Infrastructure 2014-2020 of the project: Innovative Solutions for Propulsion, Power and Safety Components of Transport Vehicles, code ITMS 313011V334, co-financed by the European Regional Development Fund.