# Suppression of Noise to Obtain a High-Performance Low-Cost Optical Encoder

Authors: Sergio Alvarez-Rodríguez; Noé Alcalá-Ochoa; Javier Cruz-Salgado; Francisco Gerardo Peña Lecona
Journal: Journal of Sensors
 (2018)

---

## 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.


---

## Body

## 1. Introduction

The sensors devoted to obtain the angular position for a shaft are known in engineering asencoders. 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 [11–15].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 [1–16]. 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 Figure1, a characteristic graph can be generated in the plane formed by the detected intensity of light versus the angular position of the polarizer.Figure 1
Example of a basic arrangement for the polarization of light.In theory, according to Malus’ LawIθ=I0cos2θ, the angular position of the polarizer should be obtained from 0 to π/2 [rad], via
(1)θ=12cos−12IθI0−1,where θ represents the angular position for the rotary polarizer, Iθ is the intensity of light detected by the photoreceiver, and I0 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 Yθ, is represented by the nonsoft function (piecewise curve), which shows measurement inaccuracies; that is, Yθ is a noisy signal.Figure 2
The filter for a peak.Figure 3
The filter for a valley.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 Y∗θ.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.


## 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 [1–16]. 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 Figure1, a characteristic graph can be generated in the plane formed by the detected intensity of light versus the angular position of the polarizer.Figure 1
Example of a basic arrangement for the polarization of light.In theory, according to Malus’ LawIθ=I0cos2θ, the angular position of the polarizer should be obtained from 0 to π/2 [rad], via
(1)θ=12cos−12IθI0−1,where θ represents the angular position for the rotary polarizer, Iθ is the intensity of light detected by the photoreceiver, and I0 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 Yθ, is represented by the nonsoft function (piecewise curve), which shows measurement inaccuracies; that is, Yθ is a noisy signal.Figure 2
The filter for a peak.Figure 3
The filter for a valley.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 Y∗θ.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 hypothesis1, 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 Figure4, but these types of optoelectronic components are very expensive.Figure 4
Examples of real behaviours in implementing concept of Figure1: expensive equipment in the dashed line, low-cost devices in the thick line, and an adjustment curve in the thin line.When the system in Figure1 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
(2)I∗θ=B0+B1Yθ+⋯+BbYθb,where Yθ is the quasi continuous function formed by actual readings of intensity of light, B are constant coefficients; b is the power of the polynomial; and I∗θ is a quasi continuous function to identify the value for Iθ, such that limb→∞I∗θ=Iθ. This adjustment is exemplified by the thin curve of Figure 4.For the purposes of this work, Figure1 is called the “phase.” Equation (1) can contain errors in obtaining the angular position, because in the real-world, there are phase identification errors (e), that is, I∗=I+e, and also because in the vicinity of 0,π/2,π,3π/4,…, small increments in intensity of light (ΔI∗) 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 δ=π/2 [rad], and its behaviour is represented by Figure 6.Figure 5
Example of a polarization system with two phases with a phase-shiftingδ=π/2 [rad].Figure 6
An example of characteristic graphs of the system with the two phases presented in Figure5.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 fromYθ 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 Yθ has a static nature.Definition 1.
LetΦi be the ith phase of the polyphase optical encoder, where i=1,…,N, and N is the total number of phases.Definition 2.
LetFi∈RM be an ordered set of points corresponding to Φi, located in a two-dimensional surface plotted by the angular position (0<θm<π) of a rotating polarizer and a normalized intensity of light (0<ym<1) detected behind a fixed analyzer, such that Fi=θ1,y1,…,θm,ym,…,θM,yMi, where M represents the total number of actual readings from Φi.Definition 3.
LetYiθ be a quasi continuous function conformed by the union of consecutive elements of Fi.Definition 4.
LetYi∗θ be a soft function, where its first angular derivative d/dθYi∗ exists and is Lipschitz continuous, with the same amplitude and phase than Y, such that Yiθ:0,π×Ω→Yi∗θ:0,π×Ω, where Ω∈R.Definition 5.
LetFi∗ be an ordered set of points taken from Yi∗θ, such that Fi∗=θ1,y1∗,…,θm,ym∗,…,θM∗,yM∗∗i⊂Yi∗θ, where M∗ 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θm,ym∗ are not actual data but points taken from Yi∗θ; as such, M∗ can be as large as desired.Knowing Definitions1–4, Sta-F is stated as follows: the filter Yi∗θ for Φi can be obtained via the following polynomial expression:
(3)Yi∗θ=A0+A1Yiθ+⋯+AaYiθa,where A0,…,a are constant coefficients and the power a must be as large as needed to correctly filter Yiθ. According to Definition 5, from (3), the filtered set Fi∗ can be obtained with M∗ as large as desired.Implementing static filter implies that (2) becomes
(4)Ii∗θ=B0+B1Yi∗θ+⋯+BbYi∗θb,which is the identification of intensity of light for Φi.


### 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θj be a set of independent angular values with j=1,…,k, 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
(5)θ¯=1k∑j=1kθj.Definition 8.
Letθj∗ be independent and identically distributed values with mean x¯ and finite variance σ2, which generates the random variable
(6)Γk=θ¯−x¯kσ.From Definitions6, 7, and 8, the following remarks can be stated:Remark 1.
The distribution functionΓk converges to the standard normal distribution function as k increases without bound.Remark 2.
Consideringθ¯∗≃x¯ as the actual value for the measured angle, then, when θ¯→θ¯∗,
(7)limk→∞∑j=1k∑i=1Nei+ϵ+εij=0,where ei is the identification error for Φi, ϵ represents an error coming from a phase-shifting technique (if some is used), and εi is the hidden and unknown phase error for Φi (see [16]).Remark 3.
Theθ¯ can make use of statistical properties stated by the Central Limit Theorem, provided that θj has Gaussian distribution.Remark 4.
In order to apply (5), some algorithm to obtain θj must be used in advance:Algorithm 1
ForN≥3, k number of angular measurements can be obtained from the possible number of combinations between phases, utilizing the phase-shifting (PS) general form θj=Gtan−1∑p=1βpIp/∑q=1βqIq, where G is a constant according to the step of the used PS algorithm and βp,q represent constant coefficients usually valued as −1,0,1.Algorithm 2
ForN≥1, k=N number of angular measurements can be obtained from θj=1/2cos−12Ii∗θ−1, which is Malus’ Law of (1) but taking the normalized intensity of light to ensure homogeneity in the set Fi. Note that only for this case, i=j.Definition 9.
Letθ¯s,u¯ be the statistical mean for θ¯, which is obtained from v-reads (u=1,2,…,v), in a fixed specific angle s, and computed via
(8)θ¯s,u¯=1v∑u=1vθ¯s,u.Definition 10.
Letθ¯s¯,u be the statistical mean for θ¯ obtained from a fixed specific read u, through consecutive angles s=1,2,…,t [deg], and computed via
(9)θ¯s¯,u=1s∑s=1tθ¯s,u.Definition 11.
Letθ¯s,u¯∗ be independent and identically distributed values with mean x¯u and finite variance σu2, which generates the random variable
(10)Γt,v=θ¯s,u¯−x¯uvσu.From Definitions9 and 11 can be stated the following remarks:Remark 5.
The distribution functionΓt,v converges to the standard normal distribution function as v increases without bound.Remark 6.
Consideringθ¯s,u¯∗≃x¯u as the actual value for the measured angle, then, when θ¯s,u¯→θ¯s,u¯∗,
(11)limk,v→∞∑u=1v∑j=1k∑i=1Nei+ϵ+εij,u=0.Remark 7.
Theθ¯s,u¯ 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 tok and v. And, taking sufficiently large values for k and v, 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θj and θ¯s,u have Gaussian distributions.


## 2.1. Preliminary Design

Optical components with strictly linear behaviours should be plotted according to Malus’ Law as the dashed line shown in Figure4, but these types of optoelectronic components are very expensive.Figure 4
Examples of real behaviours in implementing concept of Figure1: expensive equipment in the dashed line, low-cost devices in the thick line, and an adjustment curve in the thin line.When the system in Figure1 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
(2)I∗θ=B0+B1Yθ+⋯+BbYθb,where Yθ is the quasi continuous function formed by actual readings of intensity of light, B are constant coefficients; b is the power of the polynomial; and I∗θ is a quasi continuous function to identify the value for Iθ, such that limb→∞I∗θ=Iθ. This adjustment is exemplified by the thin curve of Figure 4.For the purposes of this work, Figure1 is called the “phase.” Equation (1) can contain errors in obtaining the angular position, because in the real-world, there are phase identification errors (e), that is, I∗=I+e, and also because in the vicinity of 0,π/2,π,3π/4,…, small increments in intensity of light (ΔI∗) 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 δ=π/2 [rad], and its behaviour is represented by Figure 6.Figure 5
Example of a polarization system with two phases with a phase-shiftingδ=π/2 [rad].Figure 6
An example of characteristic graphs of the system with the two phases presented in Figure5.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 fromYθ 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 Yθ has a static nature.Definition 1.
LetΦi be the ith phase of the polyphase optical encoder, where i=1,…,N, and N is the total number of phases.Definition 2.
LetFi∈RM be an ordered set of points corresponding to Φi, located in a two-dimensional surface plotted by the angular position (0<θm<π) of a rotating polarizer and a normalized intensity of light (0<ym<1) detected behind a fixed analyzer, such that Fi=θ1,y1,…,θm,ym,…,θM,yMi, where M represents the total number of actual readings from Φi.Definition 3.
LetYiθ be a quasi continuous function conformed by the union of consecutive elements of Fi.Definition 4.
LetYi∗θ be a soft function, where its first angular derivative d/dθYi∗ exists and is Lipschitz continuous, with the same amplitude and phase than Y, such that Yiθ:0,π×Ω→Yi∗θ:0,π×Ω, where Ω∈R.Definition 5.
LetFi∗ be an ordered set of points taken from Yi∗θ, such that Fi∗=θ1,y1∗,…,θm,ym∗,…,θM∗,yM∗∗i⊂Yi∗θ, where M∗ 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θm,ym∗ are not actual data but points taken from Yi∗θ; as such, M∗ can be as large as desired.Knowing Definitions1–4, Sta-F is stated as follows: the filter Yi∗θ for Φi can be obtained via the following polynomial expression:
(3)Yi∗θ=A0+A1Yiθ+⋯+AaYiθa,where A0,…,a are constant coefficients and the power a must be as large as needed to correctly filter Yiθ. According to Definition 5, from (3), the filtered set Fi∗ can be obtained with M∗ as large as desired.Implementing static filter implies that (2) becomes
(4)Ii∗θ=B0+B1Yi∗θ+⋯+BbYi∗θb,which is the identification of intensity of light for Φi.


## 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θj be a set of independent angular values with j=1,…,k, 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
(5)θ¯=1k∑j=1kθj.Definition 8.
Letθj∗ be independent and identically distributed values with mean x¯ and finite variance σ2, which generates the random variable
(6)Γk=θ¯−x¯kσ.From Definitions6, 7, and 8, the following remarks can be stated:Remark 1.
The distribution functionΓk converges to the standard normal distribution function as k increases without bound.Remark 2.
Consideringθ¯∗≃x¯ as the actual value for the measured angle, then, when θ¯→θ¯∗,
(7)limk→∞∑j=1k∑i=1Nei+ϵ+εij=0,where ei is the identification error for Φi, ϵ represents an error coming from a phase-shifting technique (if some is used), and εi is the hidden and unknown phase error for Φi (see [16]).Remark 3.
Theθ¯ can make use of statistical properties stated by the Central Limit Theorem, provided that θj has Gaussian distribution.Remark 4.
In order to apply (5), some algorithm to obtain θj must be used in advance:Algorithm 1
ForN≥3, k number of angular measurements can be obtained from the possible number of combinations between phases, utilizing the phase-shifting (PS) general form θj=Gtan−1∑p=1βpIp/∑q=1βqIq, where G is a constant according to the step of the used PS algorithm and βp,q represent constant coefficients usually valued as −1,0,1.Algorithm 2
ForN≥1, k=N number of angular measurements can be obtained from θj=1/2cos−12Ii∗θ−1, which is Malus’ Law of (1) but taking the normalized intensity of light to ensure homogeneity in the set Fi. Note that only for this case, i=j.Definition 9.
Letθ¯s,u¯ be the statistical mean for θ¯, which is obtained from v-reads (u=1,2,…,v), in a fixed specific angle s, and computed via
(8)θ¯s,u¯=1v∑u=1vθ¯s,u.Definition 10.
Letθ¯s¯,u be the statistical mean for θ¯ obtained from a fixed specific read u, through consecutive angles s=1,2,…,t [deg], and computed via
(9)θ¯s¯,u=1s∑s=1tθ¯s,u.Definition 11.
Letθ¯s,u¯∗ be independent and identically distributed values with mean x¯u and finite variance σu2, which generates the random variable
(10)Γt,v=θ¯s,u¯−x¯uvσu.From Definitions9 and 11 can be stated the following remarks:Remark 5.
The distribution functionΓt,v converges to the standard normal distribution function as v increases without bound.Remark 6.
Consideringθ¯s,u¯∗≃x¯u as the actual value for the measured angle, then, when θ¯s,u¯→θ¯s,u¯∗,
(11)limk,v→∞∑u=1v∑j=1k∑i=1Nei+ϵ+εij,u=0.Remark 7.
Theθ¯s,u¯ 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 tok and v. And, taking sufficiently large values for k and v, 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θj and θ¯s,u 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 from1 to 15 degrees and 8×32 reads for each degree, that is, N=k=8, t=32, and v=15.


### 3.1. The Research System

#### 3.1.1. Experimental Prototype

For this practical example, a polyphase optical encoder was manufactured as presented by Figure7, 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δ=π/4.
(7)
Eight photoresistors.
(8)
Base for analyzers and to insert photoresistors.Figure 7
Exploded view of the experimental prototype.As is presented by issues 6-7 of Figure7, there are 8 phases; thus, N=8. Figure 8 shows the geometric distribution of the polarization axes of the analyzers, with phase-shifting δ≃π/4 [rad].Figure 8
Eight phases for the encoder, with phase-shiftingδ=π/4 [rad] (45°).


#### 3.1.2. Motion System

The motion system is devoted to move the rotary polarizer (issue 4 of Figure7), 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 of311.85748:1. The stepper motor has 200 steps; as such, the resolution for angular displacements is 0°0′20.78″.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 ofM.
(2)
Collecting data (Fi) from the experimental prototype.
(3)
SendingFi to a computer.
(4)
Waiting for the characteristic equations for each phase, which are being generated by the computer, that is,Fi→Yi→Yi∗→Fi∗→Ii∗, by using Sta-F.
(5)
Collecting the characteristic equationsIi∗ 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 functionspolyfit and
polyval have been used in the following code (displayed in compact form):
(a.1)
w=linspace0,π,M;
(a.2)
x=1,2,⋯,180;
(a.3)
Fi=Fi−minFi/maxFi−minFi;
(a.4)
Ii=0.5∗1+cos2w+δi;
(a.5)
Yi∗=polyfitx,Fi,a
(a.6)
Fi∗=polyvalYi∗,x
(a.7)
Ii∗=polyfitFi∗,Ii,b,where for this example i=1,…,8, x is the set of ordered and consecutive numbers from 1 to M=180, a=7 is the power of the polynomial for the filter, b=3 is the power of the polynomial representing the identification of Malus’ law, and δi is the phase shifting for Φi. Note that Yi 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 Algorithm2 was selected to obtain θ1,…,θ8, in the following form:
(12)θj=acos2∗Ii∗−1∗90π,where for this case i=j=1,…,8. For an encoder with N=8, (5) becomes
(13)θ¯=θ1+⋯+θ88.


### 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.Table 1
Data to obtain accuracy and precision including 32 readings from 1 to 15 deg.
1
2
⋯
32
θ¯s,u¯
Deg
12⋮15
θ¯1,1θ¯2,1⋮θ¯15,1
θ¯1,2θ¯2,2⋮θ¯15,2
⋯⋯θ¯s,u⋯
θ¯1,32θ¯2,32⋮θ¯15,32
θ¯1,u¯θ¯2,u¯⋮θ¯15,u¯
θ¯s,u
θ¯s¯,1
θ¯s¯,2
⋯
θ¯s¯,32The structure of Table1 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.Fort=15 and v=32, (8)–(9) become θ¯s,u¯=1/32∑u=132θ¯s,u and θ¯s¯,u=1/15∑s=115θ¯s,u, respectively.From Table1 can also be obtained individual accuracy errors, by
(14)Es,u=absθ¯s,u−s.For example,E4,9=absθ¯4,9−4, which in numerical values is θ¯4,9=3.9995 [deg], then E4,9=0.0005 [deg].In the same way, the average error for columns isEs¯,u and the average error for rows is Es,u¯. The results for Es¯,u are shown in Figure 9, while Figure 10 shows the results for Es,u¯.Figure 9
Results forEs¯,u.Figure 10
Results forEs,u¯.Using Table1, and information from Figures 9 and 10, let us take two different criteria to evaluate accuracy error (Ae):
(1)
Taking into account the absolute value for individual errors, (Ae) is given by
(15)Ae=1480∑u=132∑s=115absθ¯s,u−s.
According to this criteria, for the proposed encoder,Ae=0.001085034 [deg] or Ae=3.906 [arc sec].
(2)
Taking into account the average of individual errors, (Ae) is given by
(16)Ae=132∑u=132θ¯s,u−8.If we take this second criteria, then, the proposed encoder hasAe=0.9 [arc sec].To evaluate the precision for the encoder, let us consider the worst working conditions, which consist in taking equationsI1,…,8∗ 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 (Pe) decreases. For 32 readings, the average for the precision error is Pe=0.007318343 [deg] or Pe=26.35 [arc sec].Figure 11
Precision for the encoder takingv=5,10,32.Nevertheless, if the specific application of this technique requires more precision, then, tuning of parameters in equationsI1,…,8∗ is required and the precision error can be reduced to
(17)Pe=115∑u=115absEs,u¯,which give rise to Pe=0.001084427 [rad] or Ep=3.904 [arc sec].To evaluate the resolution for this device, every step of the motor (0°0′20.78′′) has been taken to capture light intensity values for every phase; that is, from 0 to π/2 [rad], there are 15600×8=124,800 reads. Every read is compared with respect to 5 last reads and so can be determined how many significant changes (No.Changes) have been really produced (increasing or decreasing its value). Taking this criteria, the resolution for the encoder is obtained by computing R=No.Changes/124,800. Numerical result for the encoder resolution is R=16.9418622 [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)
unsignedlongstart=micros;
(b.2)
Ii∗=B3i∗powFi∗,3+B2i∗powFi∗,2+B1i∗F1∗+B0i;
(b.3)
angi=acos2∗Ii∗−1∗90/pi;
(b.4)
sum=sumangi;
(b.5)
average=sum/8;
(b.6)
unsignedlongend=micros;
(b.7)
longelapsedTime=end‐start;The line (b.1) activates the stopwatch; (b.2) is the link-line (a.7) of the program presented in Subsection3.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 i=1,…,8, 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μs (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(18)MRF=PPR×RPM60,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 commandanalogRead(AnInput(i)), which has an average execution time of 108 μs. As a result, conventional incremental and absolute encoders with MRF>10KHz are unable to use an Arduino board as a DAC, while the HP-LCE is able to work with any DAC speed.


## 3.1. The Research System

### 3.1.1. Experimental Prototype

For this practical example, a polyphase optical encoder was manufactured as presented by Figure7, 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δ=π/4.
(7)
Eight photoresistors.
(8)
Base for analyzers and to insert photoresistors.Figure 7
Exploded view of the experimental prototype.As is presented by issues 6-7 of Figure7, there are 8 phases; thus, N=8. Figure 8 shows the geometric distribution of the polarization axes of the analyzers, with phase-shifting δ≃π/4 [rad].Figure 8
Eight phases for the encoder, with phase-shiftingδ=π/4 [rad] (45°).


### 3.1.2. Motion System

The motion system is devoted to move the rotary polarizer (issue 4 of Figure7), 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 of311.85748:1. The stepper motor has 200 steps; as such, the resolution for angular displacements is 0°0′20.78″.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 ofM.
(2)
Collecting data (Fi) from the experimental prototype.
(3)
SendingFi to a computer.
(4)
Waiting for the characteristic equations for each phase, which are being generated by the computer, that is,Fi→Yi→Yi∗→Fi∗→Ii∗, by using Sta-F.
(5)
Collecting the characteristic equationsIi∗ 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.1.1. Experimental Prototype

For this practical example, a polyphase optical encoder was manufactured as presented by Figure7, 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δ=π/4.
(7)
Eight photoresistors.
(8)
Base for analyzers and to insert photoresistors.Figure 7
Exploded view of the experimental prototype.As is presented by issues 6-7 of Figure7, there are 8 phases; thus, N=8. Figure 8 shows the geometric distribution of the polarization axes of the analyzers, with phase-shifting δ≃π/4 [rad].Figure 8
Eight phases for the encoder, with phase-shiftingδ=π/4 [rad] (45°).


## 3.1.2. Motion System

The motion system is devoted to move the rotary polarizer (issue 4 of Figure7), 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 of311.85748:1. The stepper motor has 200 steps; as such, the resolution for angular displacements is 0°0′20.78″.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 ofM.
(2)
Collecting data (Fi) from the experimental prototype.
(3)
SendingFi to a computer.
(4)
Waiting for the characteristic equations for each phase, which are being generated by the computer, that is,Fi→Yi→Yi∗→Fi∗→Ii∗, by using Sta-F.
(5)
Collecting the characteristic equationsIi∗ 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 functionspolyfit and
polyval have been used in the following code (displayed in compact form):
(a.1)
w=linspace0,π,M;
(a.2)
x=1,2,⋯,180;
(a.3)
Fi=Fi−minFi/maxFi−minFi;
(a.4)
Ii=0.5∗1+cos2w+δi;
(a.5)
Yi∗=polyfitx,Fi,a
(a.6)
Fi∗=polyvalYi∗,x
(a.7)
Ii∗=polyfitFi∗,Ii,b,where for this example i=1,…,8, x is the set of ordered and consecutive numbers from 1 to M=180, a=7 is the power of the polynomial for the filter, b=3 is the power of the polynomial representing the identification of Malus’ law, and δi is the phase shifting for Φi. Note that Yi 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 Algorithm2 was selected to obtain θ1,…,θ8, in the following form:
(12)θj=acos2∗Ii∗−1∗90π,where for this case i=j=1,…,8. For an encoder with N=8, (5) becomes
(13)θ¯=θ1+⋯+θ88.


## 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.Table 1
Data to obtain accuracy and precision including 32 readings from 1 to 15 deg.
1
2
⋯
32
θ¯s,u¯
Deg
12⋮15
θ¯1,1θ¯2,1⋮θ¯15,1
θ¯1,2θ¯2,2⋮θ¯15,2
⋯⋯θ¯s,u⋯
θ¯1,32θ¯2,32⋮θ¯15,32
θ¯1,u¯θ¯2,u¯⋮θ¯15,u¯
θ¯s,u
θ¯s¯,1
θ¯s¯,2
⋯
θ¯s¯,32The structure of Table1 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.Fort=15 and v=32, (8)–(9) become θ¯s,u¯=1/32∑u=132θ¯s,u and θ¯s¯,u=1/15∑s=115θ¯s,u, respectively.From Table1 can also be obtained individual accuracy errors, by
(14)Es,u=absθ¯s,u−s.For example,E4,9=absθ¯4,9−4, which in numerical values is θ¯4,9=3.9995 [deg], then E4,9=0.0005 [deg].In the same way, the average error for columns isEs¯,u and the average error for rows is Es,u¯. The results for Es¯,u are shown in Figure 9, while Figure 10 shows the results for Es,u¯.Figure 9
Results forEs¯,u.Figure 10
Results forEs,u¯.Using Table1, and information from Figures 9 and 10, let us take two different criteria to evaluate accuracy error (Ae):
(1)
Taking into account the absolute value for individual errors, (Ae) is given by
(15)Ae=1480∑u=132∑s=115absθ¯s,u−s.
According to this criteria, for the proposed encoder,Ae=0.001085034 [deg] or Ae=3.906 [arc sec].
(2)
Taking into account the average of individual errors, (Ae) is given by
(16)Ae=132∑u=132θ¯s,u−8.If we take this second criteria, then, the proposed encoder hasAe=0.9 [arc sec].To evaluate the precision for the encoder, let us consider the worst working conditions, which consist in taking equationsI1,…,8∗ 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 (Pe) decreases. For 32 readings, the average for the precision error is Pe=0.007318343 [deg] or Pe=26.35 [arc sec].Figure 11
Precision for the encoder takingv=5,10,32.Nevertheless, if the specific application of this technique requires more precision, then, tuning of parameters in equationsI1,…,8∗ is required and the precision error can be reduced to
(17)Pe=115∑u=115absEs,u¯,which give rise to Pe=0.001084427 [rad] or Ep=3.904 [arc sec].To evaluate the resolution for this device, every step of the motor (0°0′20.78′′) has been taken to capture light intensity values for every phase; that is, from 0 to π/2 [rad], there are 15600×8=124,800 reads. Every read is compared with respect to 5 last reads and so can be determined how many significant changes (No.Changes) have been really produced (increasing or decreasing its value). Taking this criteria, the resolution for the encoder is obtained by computing R=No.Changes/124,800. Numerical result for the encoder resolution is R=16.9418622 [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)
unsignedlongstart=micros;
(b.2)
Ii∗=B3i∗powFi∗,3+B2i∗powFi∗,2+B1i∗F1∗+B0i;
(b.3)
angi=acos2∗Ii∗−1∗90/pi;
(b.4)
sum=sumangi;
(b.5)
average=sum/8;
(b.6)
unsignedlongend=micros;
(b.7)
longelapsedTime=end‐start;The line (b.1) activates the stopwatch; (b.2) is the link-line (a.7) of the program presented in Subsection3.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 i=1,…,8, 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μs (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(18)MRF=PPR×RPM60,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 commandanalogRead(AnInput(i)), which has an average execution time of 108 μs. As a result, conventional incremental and absolute encoders with MRF>10KHz are unable to use an Arduino board as a DAC, while the HP-LCE is able to work with any DAC speed.


## 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.Table 1
Data to obtain accuracy and precision including 32 readings from 1 to 15 deg.
1
2
⋯
32
θ¯s,u¯
Deg
12⋮15
θ¯1,1θ¯2,1⋮θ¯15,1
θ¯1,2θ¯2,2⋮θ¯15,2
⋯⋯θ¯s,u⋯
θ¯1,32θ¯2,32⋮θ¯15,32
θ¯1,u¯θ¯2,u¯⋮θ¯15,u¯
θ¯s,u
θ¯s¯,1
θ¯s¯,2
⋯
θ¯s¯,32The structure of Table1 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.Fort=15 and v=32, (8)–(9) become θ¯s,u¯=1/32∑u=132θ¯s,u and θ¯s¯,u=1/15∑s=115θ¯s,u, respectively.From Table1 can also be obtained individual accuracy errors, by
(14)Es,u=absθ¯s,u−s.For example,E4,9=absθ¯4,9−4, which in numerical values is θ¯4,9=3.9995 [deg], then E4,9=0.0005 [deg].In the same way, the average error for columns isEs¯,u and the average error for rows is Es,u¯. The results for Es¯,u are shown in Figure 9, while Figure 10 shows the results for Es,u¯.Figure 9
Results forEs¯,u.Figure 10
Results forEs,u¯.Using Table1, and information from Figures 9 and 10, let us take two different criteria to evaluate accuracy error (Ae):
(1)
Taking into account the absolute value for individual errors, (Ae) is given by
(15)Ae=1480∑u=132∑s=115absθ¯s,u−s.
According to this criteria, for the proposed encoder,Ae=0.001085034 [deg] or Ae=3.906 [arc sec].
(2)
Taking into account the average of individual errors, (Ae) is given by
(16)Ae=132∑u=132θ¯s,u−8.If we take this second criteria, then, the proposed encoder hasAe=0.9 [arc sec].To evaluate the precision for the encoder, let us consider the worst working conditions, which consist in taking equationsI1,…,8∗ 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 (Pe) decreases. For 32 readings, the average for the precision error is Pe=0.007318343 [deg] or Pe=26.35 [arc sec].Figure 11
Precision for the encoder takingv=5,10,32.Nevertheless, if the specific application of this technique requires more precision, then, tuning of parameters in equationsI1,…,8∗ is required and the precision error can be reduced to
(17)Pe=115∑u=115absEs,u¯,which give rise to Pe=0.001084427 [rad] or Ep=3.904 [arc sec].To evaluate the resolution for this device, every step of the motor (0°0′20.78′′) has been taken to capture light intensity values for every phase; that is, from 0 to π/2 [rad], there are 15600×8=124,800 reads. Every read is compared with respect to 5 last reads and so can be determined how many significant changes (No.Changes) have been really produced (increasing or decreasing its value). Taking this criteria, the resolution for the encoder is obtained by computing R=No.Changes/124,800. Numerical result for the encoder resolution is R=16.9418622 [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)
unsignedlongstart=micros;
(b.2)
Ii∗=B3i∗powFi∗,3+B2i∗powFi∗,2+B1i∗F1∗+B0i;
(b.3)
angi=acos2∗Ii∗−1∗90/pi;
(b.4)
sum=sumangi;
(b.5)
average=sum/8;
(b.6)
unsignedlongend=micros;
(b.7)
longelapsedTime=end‐start;The line (b.1) activates the stopwatch; (b.2) is the link-line (a.7) of the program presented in Subsection3.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 i=1,…,8, 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μs (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(18)MRF=PPR×RPM60,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 commandanalogRead(AnInput(i)), which has an average execution time of 108 μs. As a result, conventional incremental and absolute encoders with MRF>10KHz 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 Section3.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 θj); 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, withN≤3, 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.Table2 shows a comparison between the HP-LCE (first column), the polyphase encoder given in [16] (second column), and conventional encoders (third column).Table 2
Qualitative comparison chart between encoder types including the proposed.
HP-LCE
Polyphase
Conv-enc
Operational flexibility
High
High
Low
Factory costs
Low
Low
Medium to high
Manufacturing complexity
Low
Low
High
Mechanical wear
Low
Low
Low
Initial condition detection
Yes
Yes
Inc-noAbs-yes
Confidence level
High
High
High
MRS (or MRF)
High
High
Medium to high
Compatible with any DAC
Yes
Yes
NoFinally, Table3 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.Table 3
Comparison chart for accuracy, precision, and resolution (in arc sec), between encoder types including the proposed.
HP-LCE
Polyphase
Conv-enc
Accuracy
3.9
48
648
Precision
26.35
156.52
648
Resolution
16.94
94.74
648Implementation Example contains every detail to successfully implement the HP-LCE.


## 5. Conclusions

Experimental results support the claim that the given hypothesis1 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 [1–10], among many others.



---

*Source: 3458251-2018-04-24.xml*