Abstract

Currently, commercial encoders endowed with high precision are expensive sensors, and optical low-cost designs to measure the positioning angle have undesirable levels of system noise which reduce the good performance of devices. This research is devoted to the designing of mathematical filters to suppress noise in polarized transducers, in order to obtain high accuracy, precision, and resolution, along with an adaptive maximum response speed for low-cost optical encoders. This design was proved through a prototype inside a research platform, and experimental results show an accuracy of 3.9, a precision of 26, and a resolution of 17 [arc seconds], at least for the specified working conditions, for the sensing of the angular position of a rotary polarizer. From this work has been obtained a high-performance low-cost polyphase optical encoder, which uses filtering mathematical principles potentially generalizable to other inventions.

1. Introduction

The sensors devoted to obtain the angular position for a shaft are known in engineering as encoders. The most commercial and popular are incremental and absolute encoders, resolvers, and encoding potentiometers.

Also, some efforts have been made in designing optical encoders taking advantage of the polarization properties of light. The state of the art related with these types of devices is mainly found in patent publications. The main patents related to this subject are briefly described in the following chronological order:

An encoder principle is proposed in [1], to identify the polarization of light in proper phase sequence, using photoelectric devices.

In [2], a photoelectric conversion design is presented to measure the rotation angle of a shaft using polarizer discs.

In [3], an angular position transducer is designed with various processing devices to convert an analog signal generated by polarizing light into a discrete output signal, utilizing a polarized disc with coded tracks.

In [4], an angular position sensor is designed with three polarized phases rotated 60° to each other.

In [5], a simple principle for an encoder design is presented, which detects the amount of light using a photoemitter and a photodetector, arranged on opposite sides of two polarized filters.

In [6], the polarized light is directed towards a plurality of fixed analyzers and light detectors which outputs an electrical signal to a phase processor.

In [7], the angular position is detected by using amplitude and quadrant information.

In [8], polarization difference imaging techniques are used to calculate the orientation of a rotatable member.

In [9], an encoder is constructed with a multichannel reception module to generate two signals proportional to light intensity of the beam from the polarizers.

In [10], a device is presented for detecting a reference position signal and for calculating a relative rotation angle between both a fixed and a movable unit.

More information related to this subject can be found in [1115].

A new approach is developed in [16], where a novel encoder is proposed to obtain better accuracy, precision, and resolution than commercial encoders, but using low-cost optical components.

1.1. Motivation for This Research

On the one hand, conventional rotary encoders have some drawbacks which are difficult to overcome: most of them require expensive processes for manufacturing their coded wheels; their accuracy, precision, and resolution are limited by the number and the size of the holes in their wheels; they are susceptible to interference; potentiometers present electromechanical problems due to friction; and so on. On the other hand, commercial use of encoders designed with polarization of light is currently very limited, because they are both expensive and susceptible to fails. These facts open up opportunity areas for innovative concepts to improving the performance of optical encoders.

Additionally, to obtain high performance in measuring angular positions, most commercial encoders must be adapted to expensive antibacklash gear-reduction systems; even so, when gears wear out, they begin presenting small measurement errors. So, the obtaining of high accuracy, precision, and resolution, directly from the transducer, and without the need to use specialized motion reducers, has always been a motivation for encoder designers. These goals have been partially achieved by [116]. Every one of them have smart operating principles based on the polarization of light; nevertheless, their commercialization has been frustrated because they are not confident devices from the engineering point of view; thus, research must be made to complete previous designs, for the obtaining of reliable low-cost positioning sensors.

1.2. The Contribution of This Work

The main contribution of this work is the design of a noise suppression system to obtain a high-performance low-cost optical encoder (HP-LCE), to be used in engineering fields where high accuracy, precision, and resolution, along with an excellent maximum response speed, are required to measure angular positions. This design can be incorporated at low cost to mechatronic machinery, industrial robotics, and every closed-loop control system where exactness in positioning is needed. Furthermore, since this design can be encapsulated in small-size and low-weight devices, it could be considered for use in drones, unmanned aerial vehicles, or even space aircraft applications. This contribution also has the potential to become the operating principle for accelerometers, gyroscopes, inertial measurement units, and compasses/magnetometers, among others.

1.3. Problem Statement

When a light beam passes through a rotary polarizer and after through a fixed analyzer behind which a photoreceiver is located as is shown in Figure 1, a characteristic graph can be generated in the plane formed by the detected intensity of light versus the angular position of the polarizer.

In theory, according to Malus’ Law , the angular position of the polarizer should be obtained from to [rad], via where represents the angular position for the rotary polarizer, is the intensity of light detected by the photoreceiver, and is the initial intensity of light.

Defining the keyword “system noise” as a random fluctuation of system variables that degrades the quality of signals and data; then, in (1) is accurate, only for imperceptible levels of system noise. In real applications, every technological device has its own levels of system noise. Particularly, commercial LEDs produce fluctuations, and commercial photoresistors delay change detection, of light intensity. Figures 2 and 3 are enlarged views of real characteristic curves, devoted to show the system noise produced by the combination of the mentioned fluctuations and delays. Actual data, hereafter called , is represented by the nonsoft function (piecewise curve), which shows measurement inaccuracies; that is, is a noisy signal.

Thus, a “filtering process” must be designed to reject noise, even for low-cost optoelectronic components, in order to successfully use (1). The concept of filters to avoid system noise is represented by the continuous function (thick line) in Figures 2 and 3 and labelled as .

Even more, the dynamic operation of the optical system can contain nonmodelled disturbances which are unknown sources of noise. Suppression of system noise can lead to increasing accuracy, precision, and resolution, for optical transducers.

2. Methodology

Claim 1. Since the use of both specialized optical components and optoelectronic hardware, for filtering processes, increases the production cost for any device, then a high-performance low-cost optical encoder must be free from these specialized solid-state elements.

Claim 2. Polarization properties of the light have enough potential to serve as the transducer principle to obtain a high-performance encoder.

Claim 3. Mathematical methods can be used as filters to deal with system noise produced by the polarization of light, in order to maintain the designed platform at a low cost.

Hypothesis 1. A high-performance low-cost optical polarizing encoder can be obtained by suppressing system noise, through the use of reliable mathematical methods.

To prove hypothesis 1, it is mandatory that the designing of the filtering process be included in an experimental system.

Two filters are proposed in this work to suppress system noise: one of them has a static operation and the other one works on active conditions, hereafter called Sta-F and Dyn-F, respectively.

2.1. Preliminary Design

Optical components with strictly linear behaviours should be plotted according to Malus’ Law as the dashed line shown in Figure 4, but these types of optoelectronic components are very expensive.

When the system in Figure 1 is implemented with low-cost optical components, the resulting characteristic graphics do not corresponds to Malus’ Law, but the nonlinear behaviour of photoresistors generate curves as that exemplified by the thick line in Figure 4; however, this problem has already been successfully resolved in [16], where it is proposed that the curve generated by low-cost optical components can be adjusted to Malus’ law by using the polynomial expression where is the quasi continuous function formed by actual readings of intensity of light, are constant coefficients; is the power of the polynomial; and is a quasi continuous function to identify the value for , such that . This adjustment is exemplified by the thin curve of Figure 4.

For the purposes of this work, Figure 1 is called the “phase.” Equation (1) can contain errors in obtaining the angular position, because in the real-world, there are phase identification errors (), that is, , and also because in the vicinity of , small increments in intensity of light () are unclear and blurred to read for small changes of angular positions (). To deal with these drawbacks, it is introduced the concept of the “polyphase” optical encoder: Figure 1 is an encoder with one phase, while Figure 5 is an encoder with two phases, phase-shifted [rad], and its behaviour is represented by Figure 6.

Evidently, by increasing the number of phases, we increase the amount of information coming from the encoder.

2.2. Design of the Static Filter

Sta-F is devoted to reducing noise from and, thus, obtains a filtered version of (2), which is not a time-dependent function. Thus, the characteristic behaviour for every phase implemented with low-cost components remains invariant in time. As the filter retains this characteristic, the filter for has a static nature.

Definition 1. Let be the ith phase of the polyphase optical encoder, where , and is the total number of phases.

Definition 2. Let be an ordered set of points corresponding to , located in a two-dimensional surface plotted by the angular position () of a rotating polarizer and a normalized intensity of light () detected behind a fixed analyzer, such that , where represents the total number of actual readings from .

Definition 3. Let be a quasi continuous function conformed by the union of consecutive elements of .

Definition 4. Let be a soft function, where its first angular derivative exists and is Lipschitz continuous, with the same amplitude and phase than , such that , where .

Definition 5. Let be an ordered set of points taken from , such that , where is the total number of points.

Note 1. For the purposes of this work, the ordered sets comply with properties of reflexivity, antisymmetry, and transitivity only for the angular position ().

Note 2. The elements are not actual data but points taken from ; as such, can be as large as desired.

Knowing Definitions 14, Sta-F is stated as follows: the filter for can be obtained via the following polynomial expression: where are constant coefficients and the power must be as large as needed to correctly filter . According to Definition 5, from (3), the filtered set can be obtained with as large as desired.

Implementing static filter implies that (2) becomes which is the identification of intensity of light for .

2.3. Design of the Dynamic Filter

Even when Sta-F is designed to remove noise from (1)–(2), remaining system noise coming from nonmodelled and unknown dynamics of the encoder must also be treated.

A statistical approach is proposed to deal with this remaining noise, by computing the statistical mean for a large number of values which are normally distributed according to the Central Limit Theorem. Also, two algorithms to obtain every individual are proposed. This new filter has a dynamic nature, because values are dynamically computed.

Definition 6. Let be a set of independent angular values with , obtained from the same position of the polarizer (via some specific algorithm) and normally distributed around some statistical mean .

Definition 7. Let be the angular position of the polarizer, obtained by

Definition 8. Let be independent and identically distributed values with mean and finite variance , which generates the random variable

From Definitions 6, 7, and 8, the following remarks can be stated:

Remark 1. The distribution function converges to the standard normal distribution function as increases without bound.

Remark 2. Considering as the actual value for the measured angle, then, when , where is the identification error for , represents an error coming from a phase-shifting technique (if some is used), and is the hidden and unknown phase error for (see [16]).

Remark 3. The can make use of statistical properties stated by the Central Limit Theorem, provided that has Gaussian distribution.

Remark 4. In order to apply (5), some algorithm to obtain must be used in advance:

For , number of angular measurements can be obtained from the possible number of combinations between phases, utilizing the phase-shifting (PS) general form where is a constant according to the step of the used PS algorithm and represent constant coefficients usually valued as .
For , number of angular measurements can be obtained from which is Malus’ Law of (1) but taking the normalized intensity of light to ensure homogeneity in the set . Note that only for this case, .

Definition 9. Let be the statistical mean for , which is obtained from -reads (), in a fixed specific angle , and computed via

Definition 10. Let be the statistical mean for obtained from a fixed specific read , through consecutive angles [deg], and computed via

Definition 11. Let be independent and identically distributed values with mean and finite variance , which generates the random variable

From Definitions 9 and 11 can be stated the following remarks:

Remark 5. The distribution function converges to the standard normal distribution function as increases without bound.

Remark 6. Considering as the actual value for the measured angle, then, when ,

Remark 7. The can make use of statistical properties stated by the Central Limit Theorem, provided that has Gaussian distribution.

As such, accuracy and precision for the angular position of the proposed encoder is directly proportional to and . And, taking sufficiently large values for and , the remaining errors produced by phase identifications, PS adjustments, and angular measurements vanish for practical purposes.

Summarizing, Dyn-F is used to dynamically obtain the statistical mean value of the angular position of the polarizer, provided that and have Gaussian distributions.

3. Implementation Example

For implementing the filtering process, a research system was manufactured, which includes the experimental prototype (i.e., the encoder), a motion system to move the rotary polarizer, and the hardware used. This section begins with the description of the research system and continues with an example of implementing Sta-F and Dyn-F, and finally, results of this implementation example are given for an interval of study from to degrees and reads for each degree, that is, , , and .

3.1. The Research System
3.1.1. Experimental Prototype

For this practical example, a polyphase optical encoder was manufactured as presented by Figure 7, which shows the exploded view of the experimental prototype, with the following components: (1)The source of light is a white-light ultra brilliant LED.(2)Base attached on the inner ring of the bearing.(3)Bearing to allow rotary movements for the polarizer.(4)Polarizer mounted on the inner ring of the bearing.(5)Base for the outer ring of the bearing.(6)Eight analyzers phase-shifted .(7)Eight photoresistors.(8)Base for analyzers and to insert photoresistors.

As is presented by issues 6-7 of Figure 7, there are 8 phases; thus, . Figure 8 shows the geometric distribution of the polarization axes of the analyzers, with phase-shifting [rad].

3.1.2. Motion System

The motion system is devoted to move the rotary polarizer (issue 4 of Figure 7), which is mounted on a bearing for extremely smooth movements.

A bipolar stepper motor is mounted on a solid structure after which an antibacklash gear-reduction system reduces the movement with a ratio of . The stepper motor has steps; as such, the resolution for angular displacements is .

It is important to note that the motion system is not part of the encoder but is only implemented for research purposes.

3.1.3. The Hardware

An Arduino Mega-2560 board has been used as the controller, to do the following sequence of tasks: (1)Controlling the ignition sequence to move the stepper motor, via a L298 H-bridge used as the power electronics. The long of steps of the motor are calculated according to the value of .(2)Collecting data () from the experimental prototype.(3)Sending to a computer.(4)Waiting for the characteristic equations for each phase, which are being generated by the computer, that is, , by using Sta-F.(5)Collecting the characteristic equations from the computer.When issue 5 has finished, the characterization process for the phases has been concluded. From this moment, the encoder can work indefinitely and the angle is dynamically calculated while the system is switched on.(6)Obtaining the angular position of the rotary polarizer by using Dyn-F. For this example, this point also includes dynamically displaying the value for the angle in the serial monitor of the Arduino editor.

3.2. Example of Implementation of Sta-F

Matlab is the selected software to implement issue 4 mentioned in the sequence of tasks of the Arduino board.

To exemplify the implementation of Sta-F, the Matlab functions polyfit and polyval have been used in the following code (displayed in compact form): (a.1);(a.2);(a.3);(a.4);(a.5)(a.6)(a.7),where for this example , x is the set of ordered and consecutive numbers from to , is the power of the polynomial for the filter, is the power of the polynomial representing the identification of Malus’ law, and is the phase shifting for . Note that is not included in the code because this concept only represents a curve. Also note that lines from (a.1) to (a.6) are not included in the dynamical operation of the encoder, while line (a.7) establishes the link with Dyn-F.

3.3. Example of Implementation of Dyn-F

For this example, PS algorithms are not utilized at all, which greatly simplifies implementation. Equation of Algorithm 2 was selected to obtain , in the following form: where for this case . For an encoder with , (5) becomes

3.4. Experimental Results
3.4.1. Evaluation of Accuracy, Precision, and Resolution

As is stated in [16], according to ISO 5725-1, the accuracy is defined as the proximity of measurement results to the true value and precision or reproducibility of the measurement is defined as the closeness of agreement among a set of results. The definition for resolution is taken as the capability of distinguishing between two separate but adjacent measurements. To evaluate these three concepts for the proposed encoder, real data has been taken from the research system, which has a structure exemplified in Table 1. Numerical data has not been included in this technical report to avoid large and unnecessary tables, but every table, experimental data, and additional information mentioned herein is available by contacting the authors.

The structure of Table 1 has 15 rows, for an interval from 1 to 15 degrees and 32 columns, which are 32 different readings. Every set of readings is completed in 1.17 hours; as such, the data of Table 1 has been obtained in 37.44 hours. The low-cost LED used for this encoder has a product life of 50 hours approximately.

For and , (8)–(9) become and , respectively.

From Table 1 can also be obtained individual accuracy errors, by

For example, , which in numerical values is [deg], then [deg].

In the same way, the average error for columns is and the average error for rows is . The results for are shown in Figure 9, while Figure 10 shows the results for .

Using Table 1, and information from Figures 9 and 10, let us take two different criteria to evaluate accuracy error (): (1)Taking into account the absolute value for individual errors, () is given by According to this criteria, for the proposed encoder, [deg] or [arc sec].(2)Taking into account the average of individual errors, () is given by

If we take this second criteria, then, the proposed encoder has [arc sec].

To evaluate the precision for the encoder, let us consider the worst working conditions, which consist in taking equations for 37.44 continuous working hours of the Led; that is, no tuning or adjustment of parameters are permitted. Under these conditions, Figure 11 shows results for 5, 10, and 32 reads, where it can be seen that increasing the size of the sample, the precision error () decreases. For 32 readings, the average for the precision error is [deg] or [arc sec].

Nevertheless, if the specific application of this technique requires more precision, then, tuning of parameters in equations is required and the precision error can be reduced to which give rise to [rad] or [arc sec].

To evaluate the resolution for this device, every step of the motor () has been taken to capture light intensity values for every phase; that is, from 0 to [rad], there are reads. Every read is compared with respect to 5 last reads and so can be determined how many significant changes () have been really produced (increasing or decreasing its value). Taking this criteria, the resolution for the encoder is obtained by computing . Numerical result for the encoder resolution is [arc sec].

3.4.2. Evaluation of Maximum Response Speed

Accuracy, precision, and resolution are important parameters to evaluate encoders; nevertheless, the maximum response speed (MRS) of the proposed filtering process must be studied, because this is another important parameter for the characterization of this encoder. The filters used for noise suppression need program execution time, which must be experimentally obtained (theoretical calculations are not exact). To investigate this MRS, the following program structure (displayed in compact form) was performed, which includes both Sta-F and Dyn-F: (b.1);(b.2);(b.3);(b.4);(b.5);(b.6);(b.7);

The line (b.1) activates the stopwatch; (b.2) is the link-line (a.7) of the program presented in Subsection 3.2 for obtaining the Sta-F and this link-line includes 8 program commands; (b.3) is the implementation of (14) and has 8 program commands; (b.4) and (b.5) are (15) and have 9 program commands; line (b.6) stops the stopwatch; and finally in (b.7) the elapsed time is computed. As , the complete (noncompact) program includes 27 commands.

This filtering program running on an Arduino board (with a microprocessor at 16 MHz) gives an elapsed time of 24  (microsec), which gives an execution speed of the filtering program of (1/0.000024=)41.67 KHz. In industry, instrumentation and control tasks are actually done by robust electronics as professional data acquisition cards (DACs) supported by specialized software running on commercial or professional computers; to exemplify this case, it can be mentioned that the execution speed of the same filtering program on C++ is in the order of 4.94 MHz on a computer running at 1.90 GHz (AMD A10-7300).

For the case of conventional incremental and absolute encoders, the MRS is called maximum response frequency (MRF) and is usually calculated with where PPR is the points per revolution on the encoding disc and RPM is the revolutions per minute of the rotor shaft. Equation (18) is useful to determine the minimum speed of the data acquisition card (DAC) that must be used and also to know the performance of the encoder (e.g., working inside a closed-loop control system).

To make comparisons between both types of encoders, let us take as a reference the value of 1750 rpm, which is the speed of the most used electric motors in industry. According to (18), we need a disc with a PPR = 1428 to obtain a MRF = 41.67 KHz, which is the equivalent frequency of the MRS of the program running on the Arduino board. However, we need a disc with 169,352 points per rev to obtain a MRF = 4.94 MHz, which is the MRS of the program running on a conventional computer.

Even when the data acquisition card (DAC) is not part of an encoder, for implementation purposes, it is important to take into account the speed of the data acquisition process. The Arduino board also has the possibility to work as a DAC using the command analogRead(AnInput(i)), which has an average execution time of 108 . As a result, conventional incremental and absolute encoders with are unable to use an Arduino board as a DAC, while the HP-LCE is able to work with any DAC speed.

4. Application Discussion

From Section 3.4.2 can be concluded that the MRS for the proposed filtering process depends on both the speed of the computer processor and the number of commands used to implement the filters (e.g., the number of phases selected from the HP-LCE and the way to obtain ); this flexibility lets the HP-LCE become an adaptive encoder.

The HP-LCP is able to work with any DAC speed (e.g., Arduino, NI cards, and dSPACE-1103), because its phase-based design has an analogical nature and the frequency constraint coming from the PPR parameter does not exist; this fact lends itself to a large variety of applications.

For the common use in mechatronic devices, for example, robot arms, conveyor belts, and positioning plates, the HP-LCE can be successfully implemented at low cost. However, this sensor can be used in unmanned aerial vehicles, because it is designed with low-weight materials and components.

For the case in which high-quality optical components are used, linear behaviour is expected; as such, (2) is not required, but the filtering process is needed.

This novel HP-LCE has great operational flexibility, because it can be implemented by any PS algorithm, with , but also, PS algorithms can be avoided, as is exemplified in the case of the study.

The design for the HP-LCE can work with low-, medium-, and high-cost components.

Table 2 shows a comparison between the HP-LCE (first column), the polyphase encoder given in [16] (second column), and conventional encoders (third column).

Finally, Table 3 shows a performance comparison between HP-LCE, the polyphase encoder, and a conventional incremental encoder with PPR = 2000. The units of these numerical results are given in arc seconds.

Implementation Example contains every detail to successfully implement the HP-LCE.

5. Conclusions

Experimental results support the claim that the given hypothesis 1 is true, since they show that the filtering process to suppress noise is the key point to increase accuracy, precision, and resolution in the proposed HP-LCE compared with the polyphase encoder, at least for the specified working conditions. Another important conclusion is that the filtering process has a MRS which can work with any DAC, no matter its speed, performance, and cost.

Currently, commercial high-performance optical sensors are expensive devices. However, based on the philosophy that total acceptance of nature produces knowledge, the authors consider that in order to reduce manufacturing costs for high-performance optical devices, research must be made to study the behaviour of low-cost materials and components (accepting them as they are), looking for models of their actual physics behaviour, along with mathematical proposals and strategies to indirectly obtain high precision, accuracy, resolution, and repetitiveness, for the designs under consideration. This work gives evidence that this philosophical claim can be applied at least to optical sensors and sets methodological basis for further inventions related to optical sensors.

Some filtering concepts given herein could also be implemented in inventions as [110], among many others.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

Special thanks are due to Instituto Tecnológico JMMPyH, Unidad Académica Lagos de Moreno; Centro de Investigaciones en Óptica; and Centro Universitario de los Lagos, Universidad de Guadalajara. The authors thank Diego Torres for his invaluable help in the design and manufacture of the experimental prototype.