Moisture Measurement in Paper Pulp Using Fringing Field Dielectrometry Project Report 2003-F-1 K. Sundararajan, L. Byrd II, C. Wai-Mak, N. Semenyuk, and A.V. Mamishev Sensors, Energy, and Automation Laboratory Department of Electrical Engineering University of Washington Email: [email protected] http://www.ee.washington.edu/research/seal Abstract Moisture control of paper pulp is a key step in paper manufacturing. To ensure control efficiency, a fast and accurate moisture sensor is desired. Currently existing technologies can accurately measure moisture content of the pulp with fiber content in excess of 20%; yet for cases with lower paper percentages, challenges still remain. Significant market potential exists for an inexpensive and reliable feed-forward moisture control technique. Existing techniques do not yet perform adequately in the field, although laboratory studies claim high measurement accuracy and reliability. In this report, fringing electric field dielectric spectroscopy is used to estimate the fiber content of laboratory-made paper pulp. The fiber content and the titanium dioxide concentration in the paper pulp samples are varied from 100% to 3%, and 0% to 7% respectively. The resulting dielectric measurements show a near-linear dependency on the fiber content. The moisture content in the pulp is estimated using a self-adapting algorithm. The algorithm automatically selects different parameters and equations for the estimation process based on the data sets used to train it. The fiber content was estimated, using a linear self-learning model. Table of Contents List of Figures .................................................................................................................... iii Chapter 1. Introduction ................................................................................................. 1 Chapter 2. State of the Art ............................................................................................ 3 2.1. Microwave Techniques ....................................................................................... 3 2.2. Reflection Based Techniques .............................................................................. 5 Chapter 3. Interdigital Fringing Field Dielectrometry.................................................. 8 3.1. Interdigital Fringing Field Sensor ....................................................................... 8 3.2. Dielectric Spectroscopy .................................................................................... 11 3.3. Debye Model ..................................................................................................... 12 Chapter 4. Experimental Setup ................................................................................... 17 Chapter 5. Experiments with High Fiber Concentration Pulp (100% to 10%) .......... 20 5.1. Experimental Procedure .................................................................................... 20 5.2. Experimental Results ........................................................................................ 20 5.3. Data Analysis .................................................................................................... 22 Chapter 6. Experiments with Low Fiber Concentration Pulp (10% to 3%) ............... 24 6.1. Experimental Procedure .................................................................................... 24 6.2. Experimental Results ........................................................................................ 24 6.3. Data Analysis .................................................................................................... 27 Chapter 7. Experiments with Titanium Dioxide......................................................... 33 7.1. Experimental Procedure .................................................................................... 33 7.2. Experimental Results ........................................................................................ 33 7.3. Data Analysis .................................................................................................... 37 Chapter 8. Experiments with Clay.............................................................................. 41 8.1. Experimental Procedure .................................................................................... 41 8.2. Experimental Results ........................................................................................ 41 8.3. Data Analysis .................................................................................................... 45 i Chapter 9. Experiments with Calcium Carbonate ...................................................... 47 9.1. Experimental Procedure .................................................................................... 47 9.2. Experimental Results ........................................................................................ 47 9.3. Data Analysis .................................................................................................... 51 Chapter 10. Parameter Selection Algorithm ................................................................. 53 Chapter 11. Repeatability Tests .................................................................................... 58 Chapter 12. Reproducibility Tests ................................................................................ 61 Chapter 13. Validation of Estimation Algorithms ........................................................ 64 Chapter 14. Pass line Sensitivity .................................................................................. 68 14.1. Experimental Results .................................................................................... 68 14.2. Data Analysis ................................................................................................ 71 Chapter 15. Disturbance factors ................................................................................... 75 Chapter 16. Variation with Pulp ................................................................................... 77 Chapter 17. Temperature Variations ............................................................................ 82 17.1. Experimental Procedure ................................................................................ 82 17.2. Experimental Results .................................................................................... 83 Chapter 18. Future Work .............................................................................................. 86 18.1. High Frequency Measurements: ................................................................... 86 18.2. Temperature Variation .................................................................................. 88 18.3. Improvements in Estimation Algorithms ...................................................... 89 18.4. Pass line Sensitivity ...................................................................................... 89 Chapter 19. Conclusions ............................................................................................... 90 References ......................................................................................................................... 91 Appendix ........................................................................................................................... 97 ii List of Figures Figure 1.1. Photograph of a paper machine. ..................................................................... 2 Figure 3.1. A fringing field dielectrometry sensor can be visualized as a parallel plate capacitor whose electrodes open up to provide a one-sided access to material under test [29]......................................................................................................... 8 Figure 3.2. The term “interdigital” refers to the pattern of fingers or “digits” that is resembled by the shape and relative position of the electrodes [31]. .................... 9 Figure 3.3. A generic interdigital sensor with a periodicity λ [34,35]. ........................... 10 Figure 3.4. A conceptual view of multiple penetration depth sensor. .............................. 10 Figure 3.5. Mechanisms influencing the loss factor of a moist material over a wide range of frequencies f (Hz). (A) DC conductivity, (B) Maxwell-Wagner polarization, (C) dipolar polarization of water bound to the matrix of the material, (D) dipolar polarization of free water [36]. ............................................................................ 12 Figure 3.6. Debye model for time dependent polarization [39]....................................... 15 Figure 3.7. Real and imaginary parts of complex susceptibility as a function of frequency. [40] ...................................................................................................... 16 Figure 4.1. Photograph of experimental setup. ................................................................ 17 Figure 4.2. The top-down view of the interdigital sensor tray with the spatial periodicity of 40 mm, finger length of 160 mm and an approximate penetration depth of 13 mm. ........................................................................................................................ 18 Figure 5.1. Measurements of paper pulp samples with 0% to 90% moisture concentration at frequencies from 200 Hz to 100 kHz. ................................................................ 21 Figure 5.2. Fiber content as a function of the conductance of the paper pulp samples with 0% to 90% moisture concentration at various frequencies from 200 Hz to 100 kHz. ................................................................................................................ 22 Figure 5.3. Fiber content as a function of the capacitance of the paper pulp samples with 0% to 90% fiber concentration at various frequencies from 200 Hz to 100 kHz. ....................................................................................................................... 23 Figure 6.1. Measurements of paper pulp samples with 90% to 97% moisture concentration at frequencies from 200 Hz to 100 kHz. ........................................ 25 Figure 6.2. The capacitance measured at 5 kHz shows separation between measurements to be much greater than twice the standard deviation. This indicates towards the possibility of achieving higher resolution using the sensor. ................................. 26 Figure 6.3. Cole-Cole plots from measurements of paper pulp samples with 3% to 10% paper concentration at frequencies from 50 Hz to 100 kHz. ................................ 27 iii Figure 6.4. Conductance plots from measurements of paper pulp samples with 90% to 96% moisture concentration at frequencies from 200 Hz to 100 kHz. ................. 29 Figure 6.5. Capacitance plots from measurements of paper pulp samples with 90% to 96% moisture concentration at frequencies from 200 Hz to 100 kHz. ................. 29 Figure 6.6. Variation of the slope, m, in (6.1) depicting the plot between percentage of moisture content and capacitance with respect to frequency of excitation. ......... 30 Figure 6.7. Variation of the offset, k, in (6.1) depicting the plot between percentage of moisture content and capacitance with respect to frequency of excitation. ......... 30 Figure 6.8. The data obtained experimentally at 5 kHz is in agreement with the curve formulated in (6.1). ............................................................................................... 31 Figure 6.9. Standard deviation of the capacitance measurements at various moisture levels is two orders of magnitude smaller than the capacitance (10-11 vs. 10-14). 32 Figure 7.1. Measurements of paper pulp samples with 0% to 7% titanium dioxide concentration at frequencies from 200 Hz to 100 kHz. ........................................ 34 Figure 7.2. Cole-Cole plots from measurements of paper pulp samples with 0% to 7% titanium dioxide concentration at frequencies from 200 Hz to 100 kHz. ............. 35 Figure 7.3. Conductance plots from measurements of pulp samples with 0% to 7% titanium dioxide concentration at frequencies from 200 Hz to 100 kHz. ............. 36 Figure 7.4. Capacitance plots from measurements of pulp samples with 0% to 7% titanium dioxide concentration at frequencies from 200 Hz to 100 kHz. ............. 36 Figure 7.5. Comparison of the estimated concentration of fiber in the pulp to the actual concentration. ....................................................................................................... 38 Figure 7.6. Comparison of the estimated concentration of titanium dioxide in the pulp to the actual concentration. ...................................................................................... 39 Figure 7.7. Comparison of the estimated concentration of moisture in the pulp to the actual concentration. ............................................................................................ 39 Figure 8.1. Measurements of paper pulp samples with 10% to 5% fiber concentration and 0% to 5% clay at frequencies from 200 Hz to 100 kHz. ................................ 42 Figure 8.2. Cole-Cole plots from measurements of paper pulp samples with 10% to 5% paper concentration and 0% to 5% clay at frequencies from 200 Hz to 100 kHz.43 Figure 8.3. Conductance plots from measurements of pulp samples with 0% to 5% clay concentration at frequencies from 200 Hz to 100 kHz. ........................................ 44 Figure 8.4. Capacitance plots from measurements of pulp samples with 0% to 5% clay concentration at frequencies from 200 Hz to 100 kHz. ........................................ 44 Figure 8.5. Comparison of the estimated concentration of fiber in the pulp to the actual concentration. ....................................................................................................... 45 iv Figure 8.6. Comparison of the estimated concentration of clay in the pulp to the actual concentration. ....................................................................................................... 46 Figure 8.7. Comparison of the estimated concentration of moisture in the pulp to the actual concentration. ............................................................................................ 46 Figure 9.1. Measurements of paper pulp samples with 10% to 7.5% fiber concentration and 0% to 2.5% calcium carbonate at frequencies from 200 Hz to 100 kHz. ...... 48 Figure 9.2. Cole-Cole plots from measurements of paper pulp samples with 10% to 7.5% paper concentration and 0% to 2.5% calcium carbonate at frequencies from 200 Hz to 100 kHz. ....................................................................................................... 49 Figure 9.3. Conductance plots from measurements of pulp samples with 0% to 2.5% calcium carbonate concentration at frequencies from 200 Hz to 100 kHz........... 50 Figure 9.4. Capacitance plots from measurements of pulp samples with 0% to 2.5% calcium carbonate concentration at frequencies from 200 Hz to 100 kHz........... 50 Figure 9.5. Comparison of the estimated concentration of fiber in the pulp to the actual concentration. ....................................................................................................... 51 Figure 9.6. Comparison of the estimated concentration of calcium carbonate in the pulp to the actual concentration. .................................................................................. 52 Figure 9.7. Comparison of the estimated concentration of moisture in the pulp to the actual concentration. ............................................................................................ 52 Figure 10.1. Flow chart of the training algorithm. .......................................................... 55 Figure 10.2. Flow chart for evaluation algorithm. .......................................................... 56 Figure 10.3. Plot of the estimated fiber content in pulp consisting of fibers and water. The estimates are based on the parameter selected by the algorithm. ................. 57 Figure 11.1. Repeatability test for measurements made using pulp containing just fiber and water. ............................................................................................................. 59 Figure 11.2. Repeatability test for measurements made using pulp containing fiber, calcium carbonate, and water............................................................................... 60 Figure 12.1. Reproducibility test for measurements made using pulp containing just fiber and water. ............................................................................................................. 62 Figure 12.2. Reproducibility test for measurements made using pulp containing fiber, calcium carbonate, and water............................................................................... 63 Figure 13.1. Validation of estimation process using equation (6.1). ............................... 64 Figure 13.2. Validation of estimation process described in Section 7.3 .......................... 65 Figure 13.3. Validation of estimation process described in Section 8.3 .......................... 66 Figure 13.4. Validation of estimation process described in Section 9.3 .......................... 67 v Figure 14.1. Measurements of paper pulp samples with 90% to 92% moisture concentration at frequencies from 200 Hz to 100 kHz, for an air gap of 2.5 mm. 69 Figure 14.2. Measurements of paper pulp samples with 90% to 92% moisture concentration at frequencies from 200 Hz to 100 kHz, for an air gap of 4.2 mm. 70 Figure 14.3. Cole-Cole plots from measurements of paper pulp samples with 90% to 92% moisture concentration at frequencies from 200 Hz to 100 kHz, for an air gap of 2.5 mm. ....................................................................................................... 72 Figure 14.4. Cole-Cole plots from measurements of paper pulp samples with 90% to 92% moisture concentration at frequencies from 200 Hz to 100 kHz, for an air gap of 4.2 mm. ....................................................................................................... 73 Figure 14.5. Normalized Capacitances measured at 7.9 kHz for an air gap of 2.5 mm, and 4.2 mm. ........................................................................................................... 74 Figure 14.6. Pass line sensitivity of the sensor at 7.9 kHz. .............................................. 74 Figure 15.1. Photograph of the controlled environment chamber. .................................. 75 Figure 16.1. Phase measurements of 3 different types of paper pulp samples with 96% to 90% moisture concentration from 200 Hz to 100 kHz. ......................................... 78 Figure 16.2. Capacitance measurements of 3 different types of paper pulp samples with 96% to 90% moisture concentration from 200 Hz to 100 kHz. ............................ 79 Figure 16.3. Conductance measurements of 3 different types of paper pulp samples with 96% to 90% moisture concentration from 200 Hz to 100 kHz. ............................ 80 Figure 16.4. Measurements of 3 different types of paper pulp samples with 96% to 90% moisture concentration at 600 Hz. ........................................................................ 81 Figure 17.1. Normalized measurements showing the effect of temperature variation on various electrical parameters of a paper pulp with 95% moisture from 1kHz to 100 kHz. ................................................................................................................ 83 Figure 17.2. Normalized measurements showing the effect of temperature variation on various electrical parameters of a paper pulp with 95% moisture at 7.9 kHz. .... 84 Figure 18.1. Cole-Cole plots from measurements of paper pulp samples with 0% to 90% moisture concentration at frequencies from 200 Hz to 100 kHz. ......................... 87 Figure 18.2. Example Cole-Cole plots ............................................................................. 88 Figure A1.1. Plot of RMS voltage between the sensing electrodes and ground at various water depths and frequencies................................................................................ 97 Figure A1.2. Near linear relationship was observed between the measured voltage and water depth............................................................................................................ 98 vi 1 Chapter 1. Introduction One of the amazingly inconspicuous, yet indispensable articles used in everyday life is paper. Thousands of mills worldwide churn out 312 million tons of paper annually. Interestingly, papermaking process is still more of an art than science. More often than not, not all of the paper rolled out of a paper machine is perfect. To ensure quality output, it is critical to monitor and control various properties of paper such as its caliper, thickness, opacity and, importantly, its moisture content. Currently, all the properties of the paper are measured only at the dry end of the paper machine; at the very end of the process cycle. Thus, the quality control is primarily a feedback control loop [1,2]. While this control architecture offers stability, it is highly reactive in nature. That is, the system parameters are altered only after output deviations are registered. Hence, there is a considerable delay from the moment there is a deviation in the output, to the moment the parameter changes are reflected in the output. This delay is critical in the case of paper machines. A delay of even ten seconds in the control system of a paper machine, operating at a nominal speed of 2000 m/min, will result in more than 0.2 miles of paper of unacceptable quality. Even though this paper can be recycled to produce lower quality paper, there is considerable monetary loss that is incurred on counts of energy usage, machine time, and utilization of human resources. The obvious solution to this problem is to incorporate additional feed forward control architecture. In such architecture, the properties of the paper are measured at wet end of the paper machine (the initial stages), and the process parameters down the process line are modified to correct the deviations in the paper properties. Figure 1.1 shows the wire section (wet end) of the paper machine. A major hurdle in the practical implementation of feed forward control in paper machines is the availability of sensing technologies for the wet end. The paper pulp at the wet end contains numerous chemical additives, and is primarily an aqueous suspension. These additives alter the response of the paper pulp for various sensing techniques. The changes in the response cannot be calibrated into the existing measurement techniques 2 based on microwave attenuation or infrared absorption, as the composition of the additives change on a daily basis depending on the type of paper being produced. Thus, it is very difficult to estimate the fiber content of the pulp accurately and reliably. Figure 1.1. Photograph of a paper machine. Paper manufacturers are looking for non-invasive, non-contact sensing technologies that can accurately measure the fiber content of paper pulp at the wet end of the paper machine. The moisture content of the paper pulp at the wet end ranges from 99% to 80%. This low concentration of fiber in the pulp makes it hard to detect concentration fluctuations with adequate resolution. Fringing field dielectric spectroscopy is a potential sensing technology that could be used to estimate the moisture content of the paper pulp at the wet end of a paper machine. In this technique, fringing electric field penetrates through the paper pulp. The phase and the magnitude of these field lines change depending on the dielectric properties of the paper pulp. These changes in the fields are studied over a frequency range of 200 Hz to 100 kHz. Based on these changes, the fiber content of the paper pulp is estimated. 3 Chapter 2. State of the Art The methods currently being used to measure moisture in paper pulp are mostly intrusive [3-5], or require certain special operating conditions such as double-sided contact measurements [3-5]. Several patents [6-21] have proposed using an electromagnetic field perturbation sensor for measuring the water concentration in the wet end of the paper machine. In these patents it is assumed that all the water in the pulp is held by paper fibers and that all of electrical conductivity is due to water molecules alone. The concentration of paper fibers in the pulp is indirectly determined by measuring the conductivity of the pulp. The first assumption limits the measurements to high concentrations of fiber content. At higher moisture levels, the fiber is in suspension in water and hence the assumption is no longer valid. The conductivity of the pulp is altered by the presence of additives such as titanium dioxide, alkalis, and clay. Hence, this method cannot be adapted for measuring moisture content in the pulp under realistic operating conditions. 2.1. Microwave Techniques Microwave techniques have been used to study the subsurface moisture since 1970s [3,22,23]. When the propagating electromagnetic wave has a frequency that is equal to the resonance frequency of the medium of propagation, stationary waves are created. Every medium has its own characteristic resonance frequency. Hence, in a multicomponent system, the system’s resonance frequency is a function of the resonance frequency of the individual components and their mole fractions. This characteristic can be used to determine the composition of materials [3,22]. Attenuation based microwave techniques have been used to estimate the moisture content of paper pulp [3]. The attenuation factor of the signal at resonance and the frequency shift are used to estimate the moisture content. Fiber concentration as low as 4 0.6% has been measured, with a standard deviation of 0.03% [3]. However, this method cannot be used for on-line monitoring of fiber concentration, as it requires a closed cavity resonator. Moreover, the method is sensitive only to fiber concentrations from 0.06% to 1%. In a paper machine, such concentrations of pulp can be found only at the headstock, where the presence of metallic stirrers and the high entropy of the pulp can affect the accuracy of the method. The methods suggested in [23,24] require measuring attenuation of the material, which is difficult to obtain [25]. The difficulty is more pronounced with low attenuation materials as the attenuation measurements are easily influenced by multiple reflections [25]. Most microwave techniques need at least two different types of measurements, such as attenuation and phase [24], or attenuation and density of sample [25]. If these techniques were to be realized, they would require at least two instruments [25] to obtain two different parameters. This would increase the measurement complexity and the cost of the measurement system [25]. Electromagnetic interference from other sources of radiation can affect the accuracy of microwave techniques. The resonance frequency of pulp is around 2.6 GHz [3], which is close to the commonly used 2.4 GHz communication channels. As the communication signals at 2.4 GHz are random in nature, their effect on the measurements cannot be effectively compensated. Hence, all the microwave systems have to be electromagnetically shielded, thus rendering the open cavity measurement models [22] impractical. The sensor reported here uses a single-sided guard plane. The proximity of the guard plane to the sensing electrodes ensures the immunity of the sensor to stray low frequency electromagnetic fields. The stray fields penetrate the pulp sheet and the wire to influence the sensor output. However, the process of penetration weakens the stray fields sufficiently, and the effect of these fields on the sensor output is negligible. The penetration depth of the electromagnetic waves cannot be controlled. Hence, it is not possible to study the moisture distribution in the pulp along the axis perpendicular to the surface of the pulp sheets. 5 2.2. Reflection Based Techniques When an electromagnetic wave encounters a discontinuity in the medium of propagation, a part of the wave is reflected back into the incident media. The ratio of the amplitudes of the electric field of the reflected wave to that of the incident wave is called the reflection coefficient. The operational efficiency of reflection based microwave techniques can be analyzed using the basic laws of electromagnetism [26-28]. Let the discontinuity in the medium of propagation be at Z = 0. Let the wave propagate from a media with dielectric constant 1 and magnetic permeability 1 , into a different media with dielectric constant 2 and magnetic permeability 2 . Let the angle of incidence be i and that of refraction be r. By Fresnel’s law, if the electric field vector of the incident wave is along the Xaxis, the reflection coefficient, R, is defined as, R E y1 Ey 2 1 sin(i) cos(i) 2 sin(r ) cos(r ) 1 sin(i ) cos(i) 2 sin(r ) cos(r ) (2.1.) where Ey1 is the amplitude of the incident electric field, and Ey2 is the amplitude of the incident electric field. If the electric field vector of the incident wave is along the Y-axis, we have, R E y1 Ey 2 1 tan(i ) 2 tan(r ) 1 tan(i) 2 tan(r ) (2.2) Since the choice of axis is arbitrary, we can choose either of the equations. Let us assume that the electric field vector of the incident wave is along the X-axis, and hence (2.1) is valid. By Snell’s law, sin(i ) n2 sin(r ) n1 (2.3) where n1 and n2 are the refractive indices of the two media. Assuming non-absorbent mediums, the refractive indices are given by, n1 1 1 (2.4) 6 n2 2 2 (2.5) r sin 1 sin(i ) 1 1 2 2 (2.6) From (2.3), (2.4), and (2.5), Let the original medium of propagation be air, and the reflecting medium be predominantly water. We have, 1 2 0 (2.7) 1 1 (2.8) To minimize the interference between the incident and the reflected waves, let, i 45 (2.9) From (2.6), (2.7), (2.8), and (2.9), 1 1 1 cos sin 1 2 2 2 2 2 R 1 1 1 cos sin 1 2 2 2 2 2 (2.10) If we consider the dielectric constant of the reflecting media to be close to that of water, 2 80 (2.11) R 0.72768 (2.12) From (2.10) and (2.11), Considering a 10% change in the dielectric constant of the reflecting media, i.e. 2 = 72, we have, R 0.71514 (2.13) From (2.12) and (2.13), we can estimate the sensitivity, S, of the method, i.e. the percentage change in the reflection coefficient for a unit change in the dielectric constant of the reflecting medium, to be S 0.17233 (2.14) As seen from (2.14), the change in reflection coefficient for a unit change in dielectric constant is very small. Hence, this method requires a setup that can measure the 7 reflection coefficient very accurately. This can be achieved by using a high power, high amplitude incident wave. However, a high power incident wave will cause polarization in the reflecting media. Another important factor to be considered is the variation in the refractive indices of the media. According to Clausius - Mosotti relation, the refractive index of a medium vary inversely with its density. n 1 1 k n2 (2.15) where is the density of the medium, and k is a constant. Hence, a non-uniform distribution of constituents of the reflecting media will adversely affect the accuracy of the method. 8 Chapter 3. Interdigital Fringing Field Dielectrometry 3.1. Interdigital Fringing Field Sensor The interdigital fringing field sensor operates in a way that is very similar to a conventional parallel plate capacitor. Figure 3.1 shows the transition from a parallel plate capacitor to a fringing field sensor. It can be seen from Figure 3.1 that the electric field lines always penetrate the bulk of the material under test, irrespective of the position of the electrodes. Hence, in addition to the electrode geometry, the capacitance between the electrodes also depends on the material’s dielectric properties and geometry. Figure 3.1. A fringing field dielectrometry sensor can be visualized as a parallel plate capacitor whose electrodes open up to provide a one-sided access to material under test [29]. As seen from Figure 3.1(c), the electrodes of a fringing field sensor are coplanar. Hence, the signal-to-noise ratio of measured capacitance will be considerably low. To strengthen the measured signal, the electrode pattern can be repeated several times. The resulting structure of the sensor is known as an interdigital structure. The term “interdigital” refers to a digit-like or finger-like periodic pattern of parallel in-plane electrodes used to build up the capacitance associated with the electric fields that penetrate into a material sample [30]. This pattern is illustrated in Figure 3.2. 9 Figure 3.2. The term “interdigital” refers to the pattern of fingers or “digits” that is resembled by the shape and relative position of the electrodes [31]. Figure 3.3 shows a generic interdigital sensor. The wavelength of the sensor is defined as the distance between the centers of two adjacent electrodes of same type. For a semi-infinite homogeneous medium placed on the surface of the sensor, the periodic variation of the electric potential along the X-axis, creates an exponentially decaying electric field along the Z-axis, which penetrates the medium. The possible variation in the properties of the material under test along the Z-axis, and hence is complex dielectric permittivity, ε*(ω), is schematically represented in Figure 3.3 by the variation in shading. The model for analyzing such multi-layered systems is discussed in detail in [32]. There exist many definitions for penetration depth. The penetration depth of a fringing field sensor is usually defined as the position at which the measured value varies from the asymptotic value by 3% [33]. As the penetration depth of a sensor depends on the position, size, and shape of the electrodes, there exists no simple mathematical expression to compute the penetration depth. The penetration depth is often estimated to be equal to one-third the wavelength of the sensor. Exact penetration depth of a sensor can be estimated by using finite element analysis software. Figure 3.4 shows the cross section of a multiple penetration depth sensor. 10 Figure 3.3. A generic interdigital sensor with a periodicity λ [34,35]. Figure 3.4. A conceptual view of multiple penetration depth sensor. 11 3.2. Dielectric Spectroscopy All dielectric materials consist of polarized dipoles. When subjected to an external electric field, these dipoles re-align so as to neutralize the effect of the external field. This re-alignment of dipoles occurs to a varying extent for different materials. Thus, the dielectric response of each dielectric material across the frequency spectrum is different, and in most cases unique. The study of this response variation is known as dielectric spectroscopy. The dielectric response of a material is generally quantified in terms of its complex dielectric permittivity. The complex dielectric permittivity * ( ) is usually represented as, * ( ) ( ) j ( ) (3.1) where ( ) is the real part of permittivity and ( ) is the loss factor. For all materials the loss factor is a function of the excitation frequency. The loss factor mechanisms are schematically shown in Figure 3.5. For a few low-loss materials, and non-polar materials, the variation in the loss factor with frequency is predominantly due to distortion in the electron clouds. Hence, the magnitude of variation of loss factor is negligibly small. The polarization of molecules arising from their reorientation with the imposed electric field is the most important phenomenon contributing to the loss factor in the radio and microwave frequencies (107 to 3x1010 Hz). This includes the dipolar polarization due to bound and free water relaxation. At infrared and visible light frequencies, the loss mechanisms due to atomic and electronic polarization (collectively known as distortion polarization) are the dominating loss mechanisms [36]. The description for the process for pure polar materials was developed by Debye in 1929 [37]. The Debye model is explained in detail in Section 3.3. 12 Figure 3.5. Mechanisms influencing the loss factor of a moist material over a wide range of frequencies f (Hz). (A) DC conductivity, (B) Maxwell-Wagner polarization, (C) dipolar polarization of water bound to the matrix of the material, (D) dipolar polarization of free water [36]. 3.3. Debye Model The Debye dielectric relaxation model [37] is the simplest way to analyze polarization in purely polar materials. The model assumes that the relaxation process is governed by first order dynamics, and hence can be characterized with a single time constant. The model can be derived using basic laws of polarization and conduction [38] as shown in the following arguments. When a dielectric is subjected to an electric field, it interacts in two principal ways, re-orientation of the defects in the dielectrics with a dipole moment, and the translative motion of the charge carriers. The resulting current in the dielectric can be written as, J E D t (3.2) 13 where J is the current density, E is the electric field, and D is the electric displacement. The electric displacement is defined as the total charge density on the electrodes and is mathematically defined by, D 0E P (3.3) where ε0 is the permittivity of free space and P is the polarization vector. The Debye model deals with the displacement current represented by the second term in (3.2). When a dielectric is subjected to an electric field E , the resulting polarization P comprises of two parts based on the time constant of the response. One part of the polarization P is the instantaneous polarization P due to the displacement of electrons with respect to the nuclei (distortion of the electron cloud). The high frequency dielectric constant ε∞ is thus defined by, 1 P 0E (3.4) The second part of the polarization P is the time-dependent polarization P(t ) due to the orientation of the dipoles in the electric field. If we let the field remain in place infinitely long, the resulting total polarization Ps defines the static dielectric constant εs as, s 1 Ps 0E (3.5) Thus we have, Ps P P(t ) (3.6) Let us assume that the time dependent polarization is governed by first order kinetics with a relaxation time of τ, such that the rate at which P approaches Ps is proportional to the difference between them. That is, dP(t ) Ps P dt When a unit step voltage u0 (t) is applied, we have, (3.7) 14 P Puo (t ) P(t ) (3.8) Taking Laplace transforms of (3.7) and (3.8), and solving for the Laplace transform of polarization P , we get, P P Ps 1 1 p p p (3.9) where p is the complex frequency variable. Taking Inverse Laplace transform of (3.9) and simplifying, we obtain, P Ps j P j 1 (3.10) Assuming a conductivity of zero and a sinusoidal steady state fields of the form, ˆ jt J Je ˆ jt E Ee (3.11) From (3.2), (3.7), (3.10) and (3.11), we get, * s j s 2 2 1 1 (3.12) The real and imaginary parts of (3.12) are known as the Debye dispersion relations, and have remained the basic model of dielectric relaxation since their inception. The frequency response of the Debye model corresponds exactly to the response of the simple lumped circuit element shown if Figure 3.6 (a), for a parallel plate electrode geometry with area A and gap d. 15 Figure 3.6. Debye model for time dependent polarization [39]. The similarity between the Debye model and the lumped circuit element is given by (3.13), (3.14) and (3.15). Cp Cs 0 A d 0 s A d RsCs (3.13) (3.14) (3.15) Even when the conductivity of a material is zero, its complex dielectric permittivity can still have a non-zero imaginary part. The energy dissipation process due to dipole re-orientation in the material, and energy dissipation due to translatory motion of charge carriers introduces the imaginary part of the complex dielectric permittivity. Equations (3.2) and (3.12) can be combined to include ohmic conductivity and Debye polarization as, dipole (3.16) o dipole (3.17) s 2 1 (3.18) s 2 1 (3.19) dipole dipole 16 Equations (3.16) – (3.19) can be presented as Cole-Cole plots shown in Figure 3.6 (b). The Cole-Cole plots plot ε′ vs. ε″ with frequency ω as an independent parameter and is an exact semicircle. Another way of studying equations (3.16) – (3.19) is shown in Figure 3.7. Dielectric Susceptibility, * ( ) , is related to permittivity, and can be expressed in terms of its real and imaginary components. * ( ) ( ) j (c) (3.20) The difference between the susceptibility and permittivity is that the term * ( ) refers to the sum of all permittivities between infinity and the frequency of interest, while * ( ) refers to the permittivity at that specific frequency [40]. Figure 3.7. Real and imaginary parts of complex susceptibility as a function of frequency. [40] 17 Chapter 4. Experimental Setup The experiments reported in this report emulate the operational conditions in a paper machine. The pulp in the wet end of the paper machine is primarily a suspension. This pulp suspension is spread on to a semi-permeable membrane made of nylon or similar polymer, and is hence unavailable for contact measurements. To emulate this setup in the laboratory, the pulp is blended to a consistency of a suspension and is placed on a tray. The tray wall prevents contact with the pulp, and hence is equivalent to the wire on the paper machine. The sensor used for these measurements is an interdigital sensor tray with a spatial periodicity of 40 mm, finger length of 160 mm, and penetration depth of 7 mm. The sensor electrodes are not in direct contact with paper pulp. Instead, the sensor is attached to the outer side of the base of an acrylic tray with a wall thickness of 5 mm. Figure 4.1 shows a photograph of the experimental setup. A guard plane is placed underneath the sensor electrodes to provide shielding from external electric fields. The geometry of the sensor is shown in Figure 4.2. Figure 4.1. Photograph of experimental setup. 18 Measurements reported here were taken using the Fluke manufactured RCL meter (model PM 6304). It generates a one-volt sinusoidal AC voltage in the frequency range from 50 Hz to 100 kHz. A custom designed circuit is also available for making measurements. The circuit is capable of making measurements from three sensors simultaneously. A data acquisition system for the circuit has been written using LabVIEW. Advanced data analysis can be potentially integrated into the software. However, as the measurements reported in this report require only single channel measurements, the custom designed circuit was not used. The interdigital sensor tray filled with paper pulp is connected to the two channels of the RCL meter. The effective impedance between the two channels is calculated by computing the magnitude attenuation and phase shift between the input voltage and loop current. 4 cm Drive 16 cm Guard Sense Figure 4.2. The top-down view of the interdigital sensor tray with the spatial periodicity of 40 mm, finger length of 160 mm and an approximate penetration depth of 13 mm. The measurements are made at frequencies in the range of 200 Hz to 100 kHz. The measurements made at the lower end of the frequency spectrum (below 200 Hz) have noise due to the AC power supply. The instrumentation limits the highest viable frequency to 100 kHz. Ten sets of measurements were taken at each frequency, and then 19 averaged to reduce the noise. It is assumed that all sources of noise have zero mean distribution. Initial contact with the Forestry Department of UW, and subsequent lab tours to the paper machines at the Forestry Department of UW and at Port Townsend paper mill, confirmed feasibility of installing these sensors on paper machines. The sensors can potentially be installed in two positions on the paper machine depending on the need. The sensor can be embedded in the mounts for hydrofoils in the wire section. This would be preferable if the sensor is to be used to measure moisture in the range of 97% to 80%. Alternatively, the sensor could also be installed just after the wire but before the press section. Currently, the setup is very simple. Although the equipment is suitable for portable measurements, it is too early in the project to install the sensors on a running paper machine. 20 Chapter 5. Experiments with High Fiber Concentration Pulp (100% to 10%) Experiments were conducted to characterize the response of the sensor to the variation of moisture level in pulp with very high fiber content. The moisture content of the pulp was varied from 0% to 90%, and measurements were made using the setup described in Chapter 2. 5.1. Experimental Procedure When the required moisture content is relatively low, it is not possible to prepare minced pulp in the laboratory using the currently available devices. Hence sheets of dried pulp are used for the measurements. Sheets of dried paper pulp are cut into the size of the sensor tray and subsequently stacked in it. The pulp sheets have to be absolutely flat, failing which air pockets are formed between the pulp sheets. These air pockets affect the measurements adversely. Calculated amount of water is sprinkled on to the sheets. The pulp sheets, being relatively dry, absorb the water quickly. The key to the successful measurement in this range is uniform distribution of water. The interdigital sensor tray filled with paper pulp is then connected to the two channels of the RCL meter and measurements are made. 5.2. Experimental Results Figure 5.1(c) shows the dependence of capacitance on the moisture content and excitation frequency. It can be seen that the capacitance initially increases with the moisture content and then starts to decrease after moisture level of 85%. 21 Figure 5.1(b) shows the dependence of phase on the moisture content and excitation frequency. The magnitude of the phase change is small. Hence, even a small noise in the phase measurement leads to cross-overs at various frequencies and moisture levels. Figure 5.1. Measurements of paper pulp samples with 0% to 90% moisture concentration at frequencies from 200 Hz to 100 kHz. 22 5.3. Data Analysis Figure 5.2 and Figure 5.3 show respectively conductance and capacitance as a function of moisture concentration of the pulp as measured. It can be observed that the capacitance starts to decrease with increase in moisture after 85% moisture concentration. This trend continues into lower fiber concentration region as will be shown in Chapter 6. It can be seen from Figure 5.2 that the rate of change of moisture concentration with conductance is very high. Hence, if conductance is used as a parameter to estimate the paper moisture concentration, then any small error in conductance measurement will be amplified and hence the resulting the error in the moisture concentration estimate will be unacceptably high. Figure 5.2. Fiber content as a function of the conductance of the paper pulp samples with 0% to 90% moisture concentration at various frequencies from 200 Hz to 100 kHz. As shown in Figure 5.3, the rate of change of moisture concentration with capacitance is low, so amplification of the error in measurement of capacitance will be 23 marginal. Hence capacitance can be used as a parameter to estimate the moisture concentration in the pulp. Figure 5.3. Fiber content as a function of the capacitance of the paper pulp samples with 0% to 90% fiber concentration at various frequencies from 200 Hz to 100 kHz. 24 Chapter 6. Experiments with Low Fiber Concentration Pulp (10% to 3%) Experiments were conducted to characterize the response of the sensor to the variation of moisture level in pulp with very low fiber content. The mositure content of the pulp was varied from 90% to 97% in steps of 1% and measurements were made using the setup described in Chapter 2. 6.1. Experimental Procedure Known quantities of paper and water are mixed in a commercial blender to obtain the paper pulp. The pulp is then cooled to ambient temperature of 25°C. The moisture loss due to evaporation can be neglected, as the loss is small compared to the total water content in the pulp. The prepared pulp is then deposited in the sensor tray. The homogeneity of spatial distribution of the pulp and reduction in the number of air pockets in the bulk of the pulp are achieved by manually rearranging the pulp in the tray. The interdigital sensor tray filled with paper pulp is then connected to the two channels of the RCL meter and measurements are made. 6.2. Experimental Results Figure 6.1(c) shows the dependence of capacitance on the moisture content and excitation frequency. It can be seen that the variation is monotonous and strictly decreasing with frequency and moisture content. As seen from Figure 6.2, the obtained curves were found to be displaced by at least twice the standard deviation. Hence inaccuracies in measurement introduce relatively smaller errors in the concentration estimates. 25 Figure 6.1. Measurements of paper pulp samples with 90% to 97% moisture concentration at frequencies from 200 Hz to 100 kHz. Figure 6.1(d) shows the dependence of conductance on the moisture content and excitation frequency. The spatial separation of the curves is not adequate to mitigate the effect of any small inaccuracies in the measurement of conductance. This may explain the high error percentages reported in [5,41,42]. Figure 6.1(b) shows the dependence of phase on the moisture content and frequency. There are cross-overs in the phase plots at various frequencies and moisture levels. This is partly due to instrumentation errors and also due to the fact that the phase is highly sensitive to noise. Hence the phase shifts at two frequencies cannot be used with 26 the frequency range under consideration to estimate the moisture content of the pulp as suggested in [25]. Figure 6.2. The capacitance measured at 5 kHz shows separation between measurements to be much greater than twice the standard deviation. This indicates towards the possibility of achieving higher resolution using the sensor. Figure 6.3 shows the Cole-Cole Plots for the measurements made. The admittance plot shows adequate resolution at higher frequencies to differentiate between the different moisture content levels of the paper pulp. 27 Figure 6.3. Cole-Cole plots from measurements of paper pulp samples with 3% to 10% paper concentration at frequencies from 50 Hz to 100 kHz. 6.3. Data Analysis Figure 6.1(c) and Figure 6.1(d) show that the measured capacitance and conductance decrease with increasing excitation frequency till 20 kHz and then increase. This can be attributed to presence of multiple relaxation processes in the paper pulp. If 28 only one relaxation process was present, the trend in capacitance and conductance would be monotonous, and strictly decreasing with frequency. The rate at which the capacitance or conductance decreases is unique to the relaxation processes of the fiber and water molecules. This can be exploited to estimate the moisture content in the pulp in the presence of other fillers, which too can influence the electrical parameters. However, it has to be first established that no other constituent of the pulp undergoes the same relaxation processes. Figure 6.4 shows the moisture content as a function of conductance at different frequencies. It can be seen that the rate of change of conductance with moisture content is small. Hence, it is not advisable to estimate the moisture content based on the conductance and the excitation frequency. This may be the main reason the methods suggested in [5,20,21,41] did not perform adequately for lower fiber concentrations. The slopes of the curves are better defined at higher concentrations of paper fiber, and hence the foresaid methods can be used to estimate the moisture content in those regions. Figure 6.5 shows the moisture concentration as a function of capacitance at different frequencies. It can be seen that slopes of the curves are higher than those of the conductance plots in Figure 6.4. Hence we estimate the moisture content of the pulp based on the measured capacitance measured and the frequency used. The curves in Figure 6.5 can be linearized and the relationship between moisture concentration, P and the capacitance, C can be expressed as: P = m×C + k (6.1) where m is the slope of the line and k is the offset constant. It can be seen that both m and k are related to the frequency of excitation. 29 Figure 6.4. Conductance plots from measurements of paper pulp samples with 90% to 96% moisture concentration at frequencies from 200 Hz to 100 kHz. Figure 6.5. Capacitance plots from measurements of paper pulp samples with 90% to 96% moisture concentration at frequencies from 200 Hz to 100 kHz. Figure 6.6 and Figure 6.7 respectively show the variation m and k with excitation frequency. It can be observed that the resolution of this method is noticeably higher at lower frequencies and hence these frequencies offer smaller error margins. 30 Figure 6.6. Variation of the slope, m, in (6.1) depicting the plot between percentage of moisture content and capacitance with respect to frequency of excitation. Figure 6.7. Variation of the offset, k, in (6.1) depicting the plot between percentage of moisture content and capacitance with respect to frequency of excitation. To determine the moisture content in the pulp given the capacitance of the pulp and the frequency of excitation used, we first determine the corresponding values of m and k from Figure 6.6 and Figure 6.7. Once these values have been determined, they are 31 substituted in (6.1) along with the measured capacitance and the moisture concentration is estimated. Figure 6.8 shows the conformity of the curve formulated in (6.1) to the data obtained experimentally. The curve formulated in (6.1) will be always valid for estimation of moisture content for all similar pulp samples if adequate reproducibility is ensured. The reproducibility and repeatability of the measurements are discussed in Chapter 11. Figure 6.8. The data obtained experimentally at 5 kHz is in agreement with the curve formulated in (6.1). 32 Figure 6.9. Standard deviation of the capacitance measurements at various moisture levels is two orders of magnitude smaller than the capacitance (10-11 vs. 10-14). The accuracy of this method relies on the ability to measure capacitance accurately and the sensitivity of the method. Figure 6.9 shows the standard deviation of the measured capacitance at 5 kHz for various moisture concentration levels. It can be seen from Figure 6.6 and Figure 6.9 that the maximum standard deviation of the estimated moisture content would be approximately 0.2379 %. 33 Chapter 7. Experiments with Titanium Dioxide Experiments were conducted to characterize the response of the sensor to the variation of moisture level in pulp with low fiber and titanium dioxide content. The concentration of the fiber was initially 6% with 94% moisture. The titanium dioxide concentration was varied from 0% to 7% in steps of 1%. The measurements were made using the setup described in Chapter 2. 7.1. Experimental Procedure Known quantities of paper, titanium dioxide and water are mixed in a commercial blender to obtain the paper pulp. The pulp is then cooled to ambient temperature of 25°C. The moisture loss due to evaporation can be neglected as the loss is small compared to the total water content in the pulp. The prepared pulp is then deposited in the sensor tray. The homogeneity of spatial distribution of the pulp and reduction in the number of air pockets in the bulk of the pulp are achieved by manually rearranging the pulp in the tray. The interdigital sensor tray filled with paper pulp is then connected to the two channels of the RCL meter and measurements are made. 7.2. Experimental Results Figure 7.1(c) shows the dependence of capacitance on the titanium dioxide content and excitation frequency. It can be seen that the variation is monotonous and strictly decreasing with titanium dioxide content. The capacitance measured at 6% fiber concentration, 94% moisture and 0% titanium dioxide is not the same as that measured for a similar configuration in Section 6.2, as shown in Figure 6.1. This could be because different types of pulp sheets were used to prepare the pulp for these experiments. The 34 fibers in each of the pulp sheet types are different and have unique dielectric properties. If desired, this property can be exploited to determine the type and the quality of the fiber in the pulp. Figure 7.1. Measurements of paper pulp samples with 0% to 7% titanium dioxide concentration at frequencies from 200 Hz to 100 kHz. Figure 7.1(b) and Figure 7.1(d) shows the dependence of phase and conductance on the titanium dioxide content and excitation frequency. There is a change in the trend of the parameters between the 20 kHz and 100 kHz. This is due to the combination of the different dielectric relaxation process of titanium dioxide, the paper fibers, and water. The frequency that exhibits the minimum conduction will also depend on the composition 35 of the pulp. This frequency can potentially be used as a handle to eliminate the effects due to additives. Figure 7.2 shows the Cole-Cole plots for the measurements made. Figure 7.2. Cole-Cole plots from measurements of paper pulp samples with 0% to 7% titanium dioxide concentration at frequencies from 200 Hz to 100 kHz. Figure 7.3 and Figure 7.4 respectively show the conductance and the capacitance measured at different frequencies from 200 Hz to 100 kHz. 36 Figure 7.3. Conductance plots from measurements of pulp samples with 0% to 7% titanium dioxide concentration at frequencies from 200 Hz to 100 kHz. Figure 7.4. Capacitance plots from measurements of pulp samples with 0% to 7% titanium dioxide concentration at frequencies from 200 Hz to 100 kHz. 37 7.3. Data Analysis The variations in capacitance, conductance and other electrical parameters are influenced by all the three components of the pulp, namely, paper fiber, titanium dioxide, and moisture. Since two independent variables are involved here, it is not possible to estimate the fiber concentration using a single parameter. So we solve the inverse problem, by estimating any three of the electrical parameters as X m11 Y m 21 Z m31 m12 m22 m32 m13 p C1 m23 t C2 m33 w C3 (7.1) where X, Y and Z are the electrical parameters estimated using fiber concentration p, titanium dioxide concentration t, moisture content w, and constants m11, m12, m13…m33 and C1, C2, and C3. Once the constants are determined, the parameters X, Y and Z can be used to estimate the concentrations of fiber, titanium dioxide and water in the pulp using (7.2), (7.3), (7.4), and (7.5). w e( d ) a( g ) eb af (7.2) t f ( d ) b( g ) af be (7.3) p 100 (t w) (7.4) 38 where, a m12 m21 m11m22 b (m12 m31 m11m32 ) d (m12 c1 m11c2 ) e (m13m22 m12 m23 ) f (m13m32 m12 m33 ) (7.5) g (m13c2 m12 c3 ) (m12 X m11Y ) (m23Y m22 Z ) The key to the success of the estimation is in the choice of the parameters X, Y and Z, and the constants m11, m12, m13…m33 and C1, C2, and C3. Figure 7.5. Comparison of the estimated concentration of fiber in the pulp to the actual concentration. 39 Figure 7.6. Comparison of the estimated concentration of titanium dioxide in the pulp to the actual concentration. Figure 7.7. Comparison of the estimated concentration of moisture in the pulp to the actual concentration. Figure 7.5, Figure 7.6 and Figure 7.7 respectively compare the concentrations of fiber, titanium dioxide, and moisture as obtained using the method described above. The 40 estimates were based on the measured phase, capacitance and conductance. These parameters were chosen manually. The algorithm that is introduced in Chapter 10 can be potentially used for choosing these parameters. Currently, we are attempting to devise a method to determine the constants and the parameters that would reduce the error. 41 Chapter 8. Experiments with Clay Experiments were conducted to characterize the response of the sensor to the variation of fiber concentration the in the presence of clay and water. The concentration of the fiber was varied from 10% to 5% and that of clay from 0% to 5% in steps of 1%. The moisture content was maintained a constant at 90%. The measurements were made using the setup described in the Chapter 2. 8.1. Experimental Procedure Known quantities of paper and water are mixed in a commercial blender to obtain the paper pulp. The pulp is then cooled to ambient temperature of 25°C. The moisture loss due to evaporation can be neglected, as the loss is small compared to the total water content in the pulp. The required amount of clay is dissolved in known quantity of water. The clay solution is then added to the prepared pulp, and the mixture is thoroughly mixed. The prepared pulp is then deposited in the sensor tray. The homogeneity of spatial distribution of the pulp and reduction in the number of air pockets in the bulk of the pulp are achieved by manually rearranging the pulp in the tray. The interdigital sensor tray filled with paper pulp is then connected to the two channels of the RCL meter and measurements are made. 8.2. Experimental Results Figure 9.1c shows the variation of capacitance with clay content and frequency. The change in capacitance with clay content is negligibly small. This indicates that the reactance of the clay molecules is very close to that of the paper fiber. Hence, the 42 additional reactance due to clay compensates for the reduction in the reactance due to the reduction in the percentage composition of the fiber molecules. Figure 9.1b and Figure 9.1d respectively show the variation in phase and conductance with the clay content and frequency. The conductance increases with the clay content. This is due to the presence of free carrier molecules in clay, which increase the conduction of the pulp. The increase in conduction, with the capacitance remaining nearly the same is reflected in the change in phase. Figure 8.1. Measurements of paper pulp samples with 10% to 5% fiber concentration and 0% to 5% clay at frequencies from 200 Hz to 100 kHz. 43 Figure 8.2 shows the Cole-Cole plots for the measurements made. Figure 8.2. Cole-Cole plots from measurements of paper pulp samples with 10% to 5% paper concentration and 0% to 5% clay at frequencies from 200 Hz to 100 kHz. Figure 9.3 and Figure 9.4 respectively show the conductance and the capacitance measured at different frequencies from 200 Hz to 100 kHz. 44 Figure 8.3. Conductance plots from measurements of pulp samples with 0% to 5% clay concentration at frequencies from 200 Hz to 100 kHz. Figure 8.4. Capacitance plots from measurements of pulp samples with 0% to 5% clay concentration at frequencies from 200 Hz to 100 kHz. 45 8.3. Data Analysis The pulp with clay in it is again a three-component system similar to the one with titanium dioxide. Hence the same estimation algorithm as used for titanium dioxide can be used for estimating the concentrations of clay, fiber and moisture in the pulp. The key to the success of the estimation is in the choice of the parameters X, Y and Z, and the constants m11, m12, m13…m33 and C1, C2, and C3. Figure 9.5, Figure 9.6, and Figure 10.3 respectively show the estimated concentrations of fiber, clay and moisture against the respective actual concentrations. These estimates were based on the conductance and phase measurements at 5 kHz. Figure 8.5. Comparison of the estimated concentration of fiber in the pulp to the actual concentration. 46 Figure 8.6. Comparison of the estimated concentration of clay in the pulp to the actual concentration. Figure 8.7. Comparison of the estimated concentration of moisture in the pulp to the actual concentration. 47 Chapter 9. Experiments with Calcium Carbonate Experiments were conducted to characterize the response of the sensor to the variation of fiber concentration the in the presence of calcium carbonate and water. The concentration of the fiber was varied from 10% to 7.5% and that of calcium carbonate from 0% to 2.5% in steps of 0.5%. The moisture content was maintained a constant at 90%. The measurements were made using the setup described in Chapter 2. 9.1. Experimental Procedure Known quantities of paper and water are mixed in a commercial blender to obtain the paper pulp. The pulp is then cooled to ambient temperature of 25°C. The moisture loss due to evaporation can be neglected, as the loss is small compared to the total water content in the pulp. The required amount of calcium carbonate is dissolved in known quantity of water. The calcium carbonate solution is then added to the prepared pulp, and the mixture is thoroughly mixed. The prepared pulp is then deposited in the sensor tray. The homogeneity of spatial distribution of the pulp and reduction in the number of air pockets in the bulk of the pulp are achieved by manually rearranging the pulp in the tray. The interdigital sensor tray filled with paper pulp is then connected to the two channels of the RCL meter and measurements are made. 9.2. Experimental Results Figure 9.1c shows the variation of capacitance with calcium carbonate content and frequency. The change in capacitance with calcium carbonate content is negligibly small. This indicates that the reactance of the pulp is dominated by moisture concentration. 48 Figure 9.1b and Figure 9.1d respectively show the variation in phase and conductance with the calcium carbonate content and frequency. The conductance increases with the calcium carbonate content. This is due to the presence of free carrier ions in calcium carbonate, which increase the conduction of the pulp. The increase in conduction, with the capacitance remaining nearly the same is reflected in the change in phase. Figure 9.1. Measurements of paper pulp samples with 10% to 7.5% fiber concentration and 0% to 2.5% calcium carbonate at frequencies from 200 Hz to 100 kHz. Figure 9.2 shows the Cole-Cole plots for the measurements made. 49 Figure 9.2. Cole-Cole plots from measurements of paper pulp samples with 10% to 7.5% paper concentration and 0% to 2.5% calcium carbonate at frequencies from 200 Hz to 100 kHz. Figure 9.3 and Figure 9.4 respectively show the conductance and the capacitance measured at different frequencies from 200 Hz to 100 kHz. 50 Figure 9.3. Conductance plots from measurements of pulp samples with 0% to 2.5% calcium carbonate concentration at frequencies from 200 Hz to 100 kHz. Figure 9.4. Capacitance plots from measurements of pulp samples with 0% to 2.5% calcium carbonate concentration at frequencies from 200 Hz to 100 kHz. 51 9.3. Data Analysis The pulp with calcium carbonate in it is again a three-component system similar to the one with titanium dioxide. Hence the same estimation algorithm as used for titanium dioxide can be used for estimating the concentrations of calcium carbonate, fiber, and moisture in the pulp. The key to the success of the estimation is in the choice of the parameters X, Y and Z, and the constants m11, m12, m13…m33 and C1, C2, and C3. Figure 9.5, Figure 9.6, and Figure 10.3 respectively show the estimated concentrations of fiber, calcium carbonate, and moisture against the respective actual concentrations. These estimates were based on the conductance and phase measurements at 5 kHz. Figure 9.5. Comparison of the estimated concentration of fiber in the pulp to the actual concentration. 52 Figure 9.6. Comparison of the estimated concentration of calcium carbonate in the pulp to the actual concentration. Figure 9.7. Comparison of the estimated concentration of moisture in the pulp to the actual concentration. 53 Chapter 10. Parameter Selection Algorithm Figure 5.1, Figure 6.1, and Figure 7.1 illustrate that all the electrical parameters measured are dependent on the moisture content of the paper pulp. Hence, there is a choice of parameters that can be used to estimate the moisture content. We propose an algorithm to choose these parameters. Figure 10.1 shows the flowchart for the training process. There are 12 basic electrical parameters that are measured or calculated over a frequency range of 500 Hz to 100 kHz for each of the paper pulp samples. These form the base parameters for the estimation process. Derived parameters are then obtained from a linear combination of any two of the base parameters. To exploit the spectral data in these parameters, parameters are further derived from a linear combination of the value of a parameter at two distinct frequencies. Each of the base and the derived parameters are used to derive a linear estimation model similar to that shown in (6.1). Least square fitting technique is used to obtain these models. Based on the model obtained, the fiber concentration of the paper pulp is estimated for numerous training data sets. The mean estimation error is then calculated for all of the parameters for each of the data sets. The parameters are then ranked according to their accuracy for each individual data set. The sum total of the ranks for the parameters is then calculated. The methods with the 10 highest total ranks are then compared with each other based on the product of their sensitivities and the accuracies to which they can be measured. The standard deviation of the parameters in the given training data set is used as a measure of measurement accuracy. This product is a measure of the inherent unbiased error component of the estimated fiber content. Figure 10.2 shows the flowchart for the estimation process. The parameter and the model selected during the training are used to estimate the moisture content of the given pulp sample. At the end of measurement, the data set collected during the estimation process is added to the database of the training set and the system is re-trained. This improves the accuracy of the method over time. 54 Figure 10.3 shows the estimated fiber content based on the parameter selected using the proposed algorithm on three unique training data sets. The sample pulp consisted of only fibers and water. The parameter used in for estimation is the ratio of the phase to the magnitude of the current flowing through the sensor at 20 kHz. The estimates have a mean normalized error of 3.096%. 55 Figure 10.1. Flow chart of the training algorithm. 56 Figure 10.2. Flow chart for evaluation algorithm. 57 Figure 10.3. Plot of the estimated fiber content in pulp consisting of fibers and water. The estimates are based on the parameter selected by the algorithm. 58 Chapter 11. Repeatability Tests The ability of the sensor to repeat measurements is critical for estimation process. The prepared pulp sample was placed in the sensor and measurements were made. The measurements are repeated approximately every 3.24 seconds. During this process, neither the sensor, nor the pulp, is disturbed. The repeatability test was performed on two types of pulp samples. The first sample had 90% moisture content with 10% fiber. Six sets of measurements were made. Figure 11.1 shows the results of the repeatability test for capacitance measured at 7.9 kHz. The mean capacitance measured was 16.24 pF. The standard deviation was found to be 0.03386 pF. The estimated moisture concentration showed a peak-to-peak variation of 0.86673%. The second sample had 90% moisture content, 7.5% fiber and 2.5% calcium carbonate. Twenty sets of measurements were made. Figure 11.2 shows the results of the repeatability test for capacitance measured at 7.9 kHz. The mean capacitance measured was 16.404 pF. The standard deviation was found to be 0.0075243 pF. The estimated moisture concentration showed a peak-to-peak variation of 3.5527e-013%. 59 Figure 11.1. Repeatability test for measurements made using pulp containing just fiber and water. 60 Figure 11.2. Repeatability test for measurements made using pulp containing fiber, calcium carbonate, and water. 61 Chapter 12. Reproducibility Tests The ability of the sensor to reproduce the measurements for similar pulp sample is established by the reproducibility test. The prepared pulp sample was placed in the sensor and measurements were made. The pulp sample is then removed from the sensor. The sensor surface is cleaned and then the same pulp sample is deposited back into the sensor tray. The reproducibility tests were performed on two types of pulp samples. The first sample had 90% moisture content with 10% fiber. Five sets of measurements were made. Figure 12.1 shows the results of the reproducibility test for the estimated moisture content, based on capacitance measured at 4 kHz. The mean capacitance measured was 16.569 pF. The standard deviation was found to be 3.2354e-14 F. The peak-to-peak variation in the estimated moisture content was found to be 0.88033 %. The second sample had 90% moisture content, 7.5% fiber and 2.5% calcium carbonate. Twenty sets of measurements were made. Figure 12.2 shows the result of the reproducibility test for the measured capacitance at 4 kHz. The mean capacitance measured was 16.817 pF. The standard deviation was found to be 5.4584e-14 F. The peak-to-peak variation in the estimated moisture content was found to be 0.1993%. 62 Figure 12.1. Reproducibility test for measurements made using pulp containing just fiber and water. 63 Figure 12.2. Reproducibility test for measurements made using pulp containing fiber, calcium carbonate, and water. 64 Chapter 13. Validation of Estimation Algorithms To validate the estimation algorithms presented in so far, blind data tests were conducted. The algorithms were trained using the data from a single experiment. One of the data points obtained was omitted in the training data set. Hence, for the purpose of evaluation, the omitted data point serves as a blind data point. The entire data from the experiment is then provided to the estimation algorithms, and the estimated moisture content is compared to the actual moisture content. Figure 13.1, Figure 13.2, Figure 13.3, and Figure 13.4 respectively show the result of the validation tests performed on equation (6.1), estimation algorithms in presence of titanium dioxide, clay and calcium carbonate. Figure 13.1. Validation of estimation process using equation (6.1). 65 Figure 13.2. Validation of estimation process described in Section 7.3 66 Figure 13.3. Validation of estimation process described in Section 8.3 67 Figure 13.4. Validation of estimation process described in Section 9.3 68 Chapter 14. Pass line Sensitivity Pass line sensitivity of the sensor is an important measure of the practical applicability of the sensor. Pass line sensitivity can be defined as the ability of the sensor to detect variation in the moisture content of the paper pulp in the presence of an air gap between the sensor surface and the paper pulp. The following experiments was conducted to demonstrate the pass line sensitivity of the fringing electric field sensor. A sensor with a spatial periodicity of 4.3 cm, finger length of 7.9 cm, and an approximate penetration depth of 1.43 cm is fabricated on a 5 mm thick Plexiglas substrate. A grounded metal plate placed beneath the sensor substrate acts as a guard plane. The paper pulp is placed in a tray of wall thickness 5 mm. The base of the tray is elevated from the surface of the sensor electrodes by use of spacers. Two set of experiments were conducted, one with an air gap of 2.5 mm, and other with 4.2 mm. The pulp preparation, and measurement techniques are the same as described in Section 6.1. The moisture content of the pulp was varied from 90% to 92% in steps of 1%. 14.1. Experimental Results Figure 14.1(a) shows the variation in magnitude of admittance with moisture content, and excitation frequency, for an air gap separation of 2.5 mm. A monotonous decrease in admittance with increasing moisture content is noticed. Figure 14.1(b) shows the variation in phase with moisture content, and excitation frequency, for an air gap separation of 2.5 mm. The lower frequency phase measurements are very noisy. Figure 14.1(c) shows the variation in capacitance with moisture content, and excitation frequency, for an air gap separation of 2.5 mm. A monotonous decrease in admittance with increasing moisture content is noticed. 69 Figure 14.1(d) shows the variation in conductance with moisture content, and excitation frequency, for an air gap separation of 2.5 mm. The measured conductance is erroneous for most of the frequencies, and hence cannot used for parameter estimation purposes. Figure 14.1. Measurements of paper pulp samples with 90% to 92% moisture concentration at frequencies from 200 Hz to 100 kHz, for an air gap of 2.5 mm. Figure 14.2(a) shows the variation in magnitude of admittance with moisture content, and excitation frequency, for an air gap separation of 4.2 mm. A monotonous decrease in admittance with increasing moisture content is noticed. 70 Figure 14.2(b) shows the variation in phase with moisture content, and excitation frequency, for an air gap separation of 4.2 mm. The lower frequency phase measurements are very noisy. Figure 14.2(c) shows the variation in capacitance with moisture content, and excitation frequency, for an air gap separation of 4.2 mm. A monotonous decrease in admittance with increasing moisture content is noticed. Figure 14.2(d) shows the variation in conductance with moisture content, and excitation frequency, for an air gap separation of 4.2 mm. The measured conductance is erroneous for most of the frequencies, and hence cannot used for parameter estimation purposes. Figure 14.2. Measurements of paper pulp samples with 90% to 92% moisture concentration at frequencies from 200 Hz to 100 kHz, for an air gap of 4.2 mm. 71 14.2. Data Analysis Figure 14.3, and Figure 14.4 show the Cole-Cole plots obtained from the measured data. It is clearly evident from the figures that the real part of the impedance and admittance was incorrectly measured. This is also reflected in Figure 14.1(b), and Figure 14.2(b). The high frequency points in the Cole-Cole plots show very good resolution with respect to moisture variation. This can be used for data extraction in the future stages of data analysis. As observed in Figure 14.1, and Figure 14.2, there is an offset in the absolute values of the measured electrical parameters. This is due to the exponential decay in the electric field intensity along the axis normal to the plane of the electrodes. The presence of a strong dielectric, the base of the Plexiglas tray, enhances this offset variation. As a first step towards minimizing this offset, we consider the ratio of the measured capacitance in the presence of the tray and pulp, to that measured in the presence of only the tray and air. Figure 14.5 shows the normalized capacitances measured at 7.9 kHz for the two air gaps. There is still a considerable variation with the change in air gap. Development of advanced algorithms is needed to reduce this variation. Figure 14.6 shows the pass line sensitivity of the sensor at 7.9 kHz. The pass line sensitivity was calculated using (14.1). P= Cd1 - Cd2 d1 - d 2 (14.1) where Cd1,and Cd2 are the normalized capacitances for air gaps d1 and d2. It can be observed from Figure 14.5 that the rate of change of normalized capacitance is about 0.0654 for unit change in moisture concentration. It can be seen from Figure 14.6 that the change in normalized capacitance with change in distance is about 0.2151 per millimeter. Hence, the pass line sensitivity is approximately 3.29% of moisture per mm. 72 Figure 14.3. Cole-Cole plots from measurements of paper pulp samples with 90% to 92% moisture concentration at frequencies from 200 Hz to 100 kHz, for an air gap of 2.5 mm. 73 Figure 14.4. Cole-Cole plots from measurements of paper pulp samples with 90% to 92% moisture concentration at frequencies from 200 Hz to 100 kHz, for an air gap of 4.2 mm. 74 Figure 14.5. Normalized Capacitances measured at 7.9 kHz for an air gap of 2.5 mm, and 4.2 mm. Figure 14.6. Pass line sensitivity of the sensor at 7.9 kHz. 75 Chapter 15. Disturbance factors The dielectric properties of most materials vary with temperature, which results in a difference in the measured impedance. The experiments conducted in this paper were performed in an air-conditioned lab with room temperature maintained around 25°C. The paper pulp was made by mixing minced paper with water in a blender. The blending process raises the temperature of the paper pulp. To accommodate this variation, all the paper samples were cooled to room temperature before the experiments were conducted. Figure 15.1 shows the controlled environmental chamber that is currently being built. The temperature and the humidity of chamber can be digitally controlled using the same computer that is used for data acquisition. Figure 15.1. Photograph of the controlled environment chamber. Paper fibers in the pulp tend to coagulate. This leads to non-homogeneous spatial distribution. Special attention needs to taken to ensure that the distribution is as homogeneous as possible. Uneven distribution can lead to variations in the results. The water used to prepare the pulp samples could contain varying degrees of metal ion concentration. This can lead to erroneous results. It is preferable to use distilled water 76 or water from a consistent source. However, if the concentration of the ions is known, the effect of metal ions in water can potentially be calibrated out of the system. The disturbances due to white noise and other similar noises have been cancelled out by means of averaging. 77 Chapter 16. Variation with Pulp The study of variation in the sensor output with change in pulp type is a critical step towards practical on-line implementation of the sensor. The results discussed in this section are the preliminary results obtained from the first set of experiments conducted to study this response variation. The experimental setup and procedure is similar to that explained in Chapter 6.1. Paper pulp is prepared from three different types of pulp sheets, namely, Doly-HV, OlyHV, and Weycel. The moisture concentration in the pulp is varied from 90% to 96%. Figure 16.1, Figure 16.2, and Figure 16.3 respectively show the phase, capacitance, and the conductance measured for the three different types of pulps for frequencies from 200 Hz to 100 kHz. Figure 16.4 compares the dissipation factor, phase, capacitance and conductance measured for the three types of pulp at 600 Hz. It is seen that the variations in the measurements are relatively small, and can be attributed to experimental error to a great extent. This variation is currently being studied. 78 Figure 16.1. Phase measurements of 3 different types of paper pulp samples with 96% to 90% moisture concentration from 200 Hz to 100 kHz. 79 Figure 16.2. Capacitance measurements of 3 different types of paper pulp samples with 96% to 90% moisture concentration from 200 Hz to 100 kHz. 80 Figure 16.3. Conductance measurements of 3 different types of paper pulp samples with 96% to 90% moisture concentration from 200 Hz to 100 kHz. 81 Figure 16.4. Measurements of 3 different types of paper pulp samples with 96% to 90% moisture concentration at 600 Hz. 82 Chapter 17. Temperature Variations The calibration based sensing techniques using FEF sensors are sensitive to temperature variations. The electrical properties of any material vary with temperature, and this effect would be more pronounced in paper pulp at the wet end of the paper machine due to very high water concentration. Thus, to accurately estimate the concentrations of the constituents of the pulp, we have to accommodate or negate the variations due to temperature fluctuations. The results discussed in this chapter are preliminary in nature, and are yet to be incorporated into the estimation algorithms discussed in Section 6.3, Section 7.3, and Chapter 10. 17.1. Experimental Procedure The experimental setup used for the experiments reported in this section is similar to the setup detailed in Chapter 4. DolyHV pulp sheets were cut into small pieces and were mixed with known quantity of water in a blender. The resulting paper pulp had 95% moisture by weight. The paper pulp was allowed to cool down to room temperature, and then measurements were made A part of this pulp was then placed in a preheated temperature chamber for two hours. The remainder of the pulp is left outside the chamber for the same amount of time. At the end of the two-hour period, the pulp samples are measured. 83 17.2. Experimental Results Figure 17.1 shows the effect of temperature variation on various electrical parameters of a paper pulp with 95% moisture from 1kHz to 100 kHz. The increase in conductance with increase in temperature as seen from Figure 17.1 (d) serves as a sanity check. Figure 17.1. Normalized measurements showing the effect of temperature variation on various electrical parameters of a paper pulp with 95% moisture from 1kHz to 100 kHz. Figure 17.2 shows the effect of temperature variation on various electrical parameters at 7.9 kHz. 84 The pulp is kept in the temperature chamber for two hours. While this wait is required for the bulk of the pulp to attain equilibrium temperature, it also leads to settling of pulp. The effect of pulp settlement is has a comparable effect on the measurements as compared to that due to temperature variation. Figure 17.2. Normalized measurements showing the effect of temperature variation on various electrical parameters of a paper pulp with 95% moisture at 7.9 kHz. To mitigate the effect of settling, we measure the paper pulp at room temperature after two hours and use those data points as representative points for settling effects. These points are shown in Figure 17.1 and Figure 17.2 as data points at 72, 73 and 74 ºF. 85 To compensate for the changes across pulp samples, all the measurements made after two hours were normalized using the measurements made as soon as the pulp was prepared. 86 Chapter 18. Future Work 18.1. High Frequency Measurements: The studies presented here are based on measurements over 3 decades of frequency. A lot more information can be extracted if higher frequency ranges are used. One of the possible analysis methods that could be used to study the pulp over a larger range of frequency is the Cole-Cole plot. Figure 18.1 shows the Cole-Cole plots for the measurements made with pulp with fiber concentration ranging from 100% to 10% and water. The Cole-Cole plots divulge information regarding the dielectric relaxations in the material. Figure 18.2 shows a sample Cole-Cole plot. The arc in the Cole-Cole plots is the loci of the complex impedance and the admittance of the material under study. The real axis intercepts of the arc are used to estimate the empirical parameters of the electrical model of the material. In most of the materials it is not possible to obtain single arcs such as the ones shown in Figure 18.2 due to the presence of overlapping arcs of other relaxations. The arc in Cole-Cole plots can be used to estimate the relaxation time constant of the relaxation process under study. The relaxation time constant R can be obtained from, Z - Rinf º Z zarc º ( Rdc - Rinf ) I z (18.1) I z º [1+ ( jwt R )y ZC ]- 1 (18.2) where where ZC is the fractional exponent, and IZ is the normalized, dimensionless form of Zzarc. 87 Figure 18.1. Cole-Cole plots from measurements of paper pulp samples with 0% to 90% moisture concentration at frequencies from 200 Hz to 100 kHz. 88 Figure 18.2. Example Cole-Cole plots The arcs in Figure 18.1 do not intercept the real axis as the phase change over the studied frequency range is very small, and the phase does not cross 90. This is due to the small frequency range used for the measurements. Efforts are currently on to procure a higher frequency network analyzer to study the dielectric behavior of the paper pulp over a wider range of frequency (possibly from 1 Hz to over 3 GHz). 18.2. Temperature Variation Temperature of the pulp can influence the output of the sensor. We intend to calibrate the sensor to variations in temperature of the pulp as the next immediate step. A controlled environment chamber (shown in Figure 15.1) has been built in-house and is in the final stages of trouble shooting and calibration process. Once the chamber is fully operational, and the effect of temperature variations have been studied, we intend to include the temperature as one of the input parameters for the estimation algorithms discussed in Section 6.3, Section 7.3, and Chapter 10. 89 18.3. Improvements in Estimation Algorithms The parameter selection algorithm suggested in Chapter 10 can be improved to accommodate the effects due to additives. The algorithm currently uses a linear fit model to estimate the parameters. Various non-linear, multivariable models can be added to set of possible fits. Such non-linear and multivariable models have been used in microwave techniques [25]. Currently only basic electrical parameters and their combinations are used as probable parameters in the algorithms. We intend to introduce density independent and near density independent variables to the parameter list. 18.4. Pass line Sensitivity Detailed pass line sensitivity studies on the sensor will be carried out once the sensor design has been fully hardened for field installation. The sensor could possibly be installed on the paper machine at the Department of Forestry, UW, for initial pass line sensitivity studies. As shown in Section 14.2, the current pass line sensitivity of the sensor is about 3,29 % of moisture per mm. While, this is a significant change, it should also be noted that the algorithms used were not meant to minimize the pass line sensitivity. The sensitivity can be reduced by use of advanced algorithms, multiple wavelength sensor arrays, and rigid construction. 90 Chapter 19. Conclusions 1. The ability of the sensor to accurately measure the moisture content in pulp over a wide range of concentration (0% to 97% moisture) has been demonstrated. 2. The effect of various additives such as titanium dioxide, clay and calcium carbonate have been studied, and the sensor has been shown to estimate the moisture content to an acceptable accuracy in their presence. 3. Repeatability tests were carried out, and the sensor was found to have a two-sigma variation of 67.724 fF; which is three orders of magnitude lesser than the measured capacitance. The estimated moisture concentration showed a peak-to-peak variation of 3.5527e-013%. 4. Reproducibility tests were carried out, and the sensor was found to have a two-sigma variation of 0.10917 pF; which is two orders of magnitude lesser than the measured capacitance. The peak-to-peak variation in the estimated moisture content was found to be 0.88033 %. 5. A novel parameter estimation algorithm is in the initial stages of development and preliminary results from it have been reported. 6. The ability of the sensor to measure various additives has been demonstrated. Hence, in theory, we can indirectly measure the ash content of the pulp by doing a differential measurement at two different locations on the wire. 7. A consistent drop in measured capacitance can be seen in Figure 11.1. This could be due to sedimentation. This ability of the sensor can also be explored to study sedimentation processes in paper pulp. 91 References [1] X. G. Wang, G. A. Dumont, and M. S. Davies, "Estimation In Paper Machine Control," IEEE Control Systems Magazine, vol. 13, no. 4, pp. 34-43, 1993. [2] X. G. Wang, G. A. Dumont, and M. S. Davies, "Adaptive Basis Weight Control in Paper Machines," Second IEEE Conference on Control Applications, vol. 1, 1993, pp. 209-216. [3] S. Nakayama, "Microwave Measurements of Low Pulp Concentration in Papermaking Process," Japanese Journal of Applied Physics, Part 1: Regular Papers & Short Notes & Review Papers, vol. 33, no. 6A, pp. 3614-3616, 1994. [4] Z. Q. Wu, W. J. Batchelor, and R. E. Johnston, "Development of an Impedance Method to Measure the Moisture Content of a Wet Paper Web," Appitta Journal, vol. 52, no. 6, pp. 425-428, Nov. 1999. [5] S. Simula, S. Ikalainen, K. Niskanen, T. Varpula, H. Seppa, and A. Paukku, "Measurement of the Dielectric Properties of Paper," Journal of Imaging Science and Technology, vol. 43, no. 5, pp. 472-477, Oct. 1999. [6] L. Chase and J. D. Goss, "Method and Apparatus for Measuring and Controlling the Surface Charecteristics of Sheet Materials Such as Paper," Patent No.5,654,799, Aug. 1997. [7] J. D. Watson, C. Hagart-Alexander, J. D. Goss, J. G. Preston, H. Hu, and L. Dudas, "Wet End Control for Papermaking Machine," Patent No.6,086,716, July 2000. 92 [8] H. Hu, C. Hagart-Alexander, L. Chase, J. D. Goss, and D. Watson, "Underwire Water Weight Turbulence Sensor," Patent No.6,149,770, Nov. 2000. [9] H. Hu, L. Chase, J. Goss, and J. Preston, "System and Method for Sheet Measurement and Control in Papermaking Machines," Patent No.6,168,687 B1, Jan. 2001. [10] E. M. Heaven, C. Hagart-Alexander, L. Chase, J. D. Goss, and D. Watson, "Fast CD and MD Control in a Sheetmaking Machine," Patent No.6,080,278, June 2000. [11] J. Preston, C. L. Chase, H. Hu, and J. D. Goss, "Weight Measurement and Measurement Standardization Sensor," Patent No.6,006,602, Dec. 1999. [12] D. A. Bossen, E. M. Heaven, and J. D. Goss, "Fast Basis Weight Control for Papermaking Machine," Patent No.5,944,955, Aug. 1999. [13] H. Hu and T. Francis, "Method for Monitoring and Controlling Water Content in Paper Stock in a Paper Making Machine," Patent No.5,853,543, Dec. 1998. [14] L. Chase, J. D. Goss, C. Hagart-Alexander, M. G. Clarke, G. V. Walford, and R. Yu, "Means of Correcting a Measurement of a Property of a Material with a Sensor that is Affected by a Second Property of the Material," Patent No.6,281,689 B1, Aug. 2001. [15] L. Chase, J. D. Goss, G. V. Walford, and J. Preston, "High Resolution System and Method for Measurement of Travelling Web," Patent No.5,928,475, July 1999. [16] L. Chase, J. D. Goss, C. Hagart-Alexander, M. G. Clarke, G. V. Walford, and R. Yu, "Means of Correcting a Measurement of a Property of a Material with a 93 Sensor that is Affected by a Second Property of the Material," Patent No.6,483,325 B1, Nov. 2002. [17] H. Hu, L. Chase, J. Goss, and J. Preston, "System and Method for Sheet Measurement and Control in Papermaking Machines," Patent No.6,059,931, May 2000. [18] H. Hu, L. Chase, J. Goss, and J. Preston, "System and Method for Sheet Measurement and Control in Papermaking Machines," Patent No.6,126,785, Oct. 2000. [19] W. J. Howarth and L. Jarvis, "Method and Apparatus for Measuring the Moisture Content of a Substance," Patent No.4,845,421, July 1989. [20] L. Chase, C. J. Goss, and T. V. Graham, "Electromagnetic Field Perturbation Sensor and Methods for Measuring Water Content in Sheetmaking Systems," Patent No.5,954,923 , Sept. 1999. [21] L. Chase, C. J. Goss, and T. V. Graham, "Electromagnetic Field Perturbation Sensor and Methods for Measuring Water Content in Sheetmaking Systems," Patent No.5,891,306, Apr. 1999. [22] S. Nakayama, "Microwave Measurements of Moisture Content of Aggregate," Japanese Journal of Applied Physics, Part 1: Regular Papers & Short Notes & Review Papers, vol. 33, no. 5A, pp. 2809-2810, 1994. [23] F. Menke and R. Knoechel, "New Density-Independent Moisture Measurement Methods Using Frequency-Swept Microwave Transmission," IEEE MTT-S International Microwave Symposium Digest, vol. 3, 1996, pp. 1415-1418. 94 [24] W. Meyer and W. M. Schilz, "Feasibility Study of Density-Independent Moisture Measurement With Microwaves," IEEE Transactions on Microwave Theory and Techniques, vol. 29, no. 7, pp. 732-739, 1981. [25] S. Okamura and Y. Zhang, "New Method for Moisture Content Measurement Using Phase Shifts at Two Microwave Frequencies," Journal of Microwave Power and Electromagnetic Energy, vol. 35, no. 3, pp. 175-178, Jan. 2000. [26] H. T. Banks, M. W. Buksas, and T. Lin, Electromagnetic Material Interrogation Using Conductive Interfaces and Acoustic Wavefronts, Society for Industrial and Applied Mathematics, 2000. [27] M. H. Vogel, Electromagnetic Scattering by a Moving Object, 1991. [28] J. C. Slater and N. H. Frank, Electromagnetism, Dover Publications, 1947. [29] A. V. Mamishev, "Interdigital Dielectrometry Sensor Design and Parameter Estimation Algorithms for Nondestructive Materials Evaluation of." Department of Electrical Engineering and Computer Science, Massachusetts Institute of Technology, 1999. [30] A. V. Mamishev, "Interdigital Dielectrometry Sensor Design and Parameter Estimation Algorithms for Nondestructive Materials Evaluation of." Department of Electrical Engineering and Computer Science, Massachusetts Institute of Technology, 1999. [31] A. V. Mamishev, "Interdigital Dielectrometry Sensor Design and Parameter Estimation Algorithms for Nondestructive Materials Evaluation of." Department of Electrical Engineering and Computer Science, Massachusetts Institute of Technology, 1999. 95 [32] A. V. Mamishev, "Interdigital Dielectrometry Sensor Design and Parameter Estimation Algorithms for Nondestructive Materials Evaluation of." Department of Electrical Engineering and Computer Science, Massachusetts Institute of Technology, 1999. [33] A. V. Mamishev, "Interdigital Dielectrometry Sensor Design and Parameter Estimation Algorithms for Nondestructive Materials Evaluation of." Department of Electrical Engineering and Computer Science, Massachusetts Institute of Technology, 1999. [34] M. C. Zaretsky, "Parameter Estimation Using Microdielectrometry with Application to Transformer Monitoring." Ph.D. Thesis, Department of Electrical Engineering and Computer Science, Massachusetts Institute of Technology, 1987. [35] P. A. von, "Application of Interdigital Dielectrometry to Moisture and Double Layer Measurements in Transformer Insulation." Department of Electrical Engineering and Computer Science, Massachusetts Institute of Technology, 1993. [36] A. W. Kraszewski, Microwave Aquametry, IEEE Press, 1996. [37] P. Debye, Polar Molecules, Chemical Catalog Co., 1929. [38] J. R. MacDonald, Impedance Spectroscopy : Emphasizing Solid Materials and Systems, Wiley New York, 1987. [39] A. V. Mamishev, "Interdigital Dielectrometry Sensor Design and Parameter Estimation Algorithms for Nondestructive Materials Evaluation of." Department of Electrical Engineering and Computer Science, Massachusetts Institute of Technology, 1999. 96 [40] D. Q. M. Craig, Dielectric Analysis of Pharmaceutical Systems, Taylor & Francis Group, 1995. [41] S. Simula and K. Niskanen, "Electrical Properties of Viscose-Kraft Fibre Mixtures," Nordic Pulp and Research Journal, vol. 14, no. 3, pp. 243-246, Sept. 1999. [42] G. A. Dumont, I. M. Jonsson, M. S. Davies, F. Ordubadi, Y. Fu, K. Natarajan, C. Lindeborg, and E. M. Heaven, "Estimation Of Moisture Variation In Paper Machines," IEEE Transactions on Control Systems Technology, vol. 1, no. 2, pp. 101-113, June 1993. 97 Appendix 1. Water Depth A preliminary experiment was conducted to demonstrate the ability of the sensor to detect change in depth of a water layer in the tray. The sensor used for this experiment is different from the sensor used for the other experiments reported in this report. A sensor with just two electrodes, placed 3 inches apart were used. A 10 V peak-to-peak sinusoidal voltage drove the electrodes. The results from the experiments are shown in Figure A1.1 and Figure A1.2 700 600 voltage rms (mv) 500 100kHz 400 10kHz 1kHz 300 100Hz 200 100 0 0 1 2 3 4 5 6 7 water depth (mm) Figure A1.1. Plot of RMS voltage between the sensing electrodes and ground at various water depths and frequencies. 98 635 y = 6.82x + 590.34 R2 = 0.968 630 625 voltage rms (mv) 100kHz 10kHz 620 Linear (100kHz) 615 610 605 600 0 1 2 3 4 5 6 7 water depth (mm) Figure A1.2. Near linear relationship was observed between the measured voltage and water depth. 99 2. PlotExptData.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%% %%%%%% %%%%% %%%%%% %%%%% Plots the basic plots for all the %%%%%% %%%%% experiments %%%%%% %%%%% %%%%%% %%%%% %%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear all; close all; % Set font size. set(0, 'DefaultAxesFontSize',13) set(0, 'DefaultTextFontSize',13) % Initializing file names. select = 1; if select == 1 directname = 'C:\Data\10-24-02\' % filename(1,:) = '10'; filename(1,:) = '09'; filename(2,:) = '08'; filename(3,:) = '07'; filename(4,:) = '06'; filename(5,:) = '05'; filename(6,:) = '04'; % filename(8,:) = '03'; AxisIndex = [9,8,7,6,5,4,3]; labelX = 'Moisture Content (%)'; elseif select == 2 directname = 'C:\Data\02-11-03\' filename(1,:) = '00'; filename(2,:) = '05'; filename(3,:) = '10'; filename(4,:) = '15'; filename(5,:) = '20'; filename(6,:) = '25'; filename(7,:) = '30'; filename(8,:) = '35'; filename(9,:) = '40'; filename(10,:) = '45'; filename(11,:) = '50'; filename(12,:) = '55'; 100 filename(13,:) = '60'; filename(14,:) = '65'; AxisIndex = [0,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5]; labelX = 'TiO_2 Content (%)'; elseif select == 3 directname = 'C:\Data\01-23-03\' filename(1,:) = '00'; filename(2,:) = '05'; filename(3,:) = '10'; filename(4,:) = '20'; filename(5,:) = '30'; filename(6,:) = '40'; AxisIndex = [0,0.5,1.0,2.0,3.0,4.0]; labelX = 'TiO_2 Content (%)'; elseif select == 4 directname = 'C:\Data\03-24-03\' filename(1,:) = '100'; filename(2,:) = '090'; filename(3,:) = '080'; filename(4,:) = '070'; filename(5,:) = '060'; filename(6,:) = '050'; filename(7,:) = '040'; filename(8,:) = '375'; filename(9,:) = '035'; filename(10,:) = '325'; filename(11,:) = '030'; filename(12,:) = '275'; filename(13,:) = '025'; filename(14,:) = '225'; filename(15,:) = '020'; filename(16,:) = '175'; filename(17,:) = '015'; filename(18,:) = '125'; filename(19,:) = '010'; AxisIndex = [100,90,80,70,60,50,40,37.5,35,32.5,30,27.5,25,22.5,20,17.5,15,12.5,10] ; labelX = 'Fiber Content (%)'; elseif select == 5 directname = 'C:\Data\04-07-03\sheet\' filename(1,:) = '100'; filename(2,:) = '090'; filename(3,:) = '080'; filename(4,:) = '070'; filename(5,:) = '060'; filename(6,:) = '050'; filename(7,:) = '040'; filename(8,:) = '030'; filename(9,:) = '020'; 101 filename(10,:) = '018'; filename(11,:) = '016'; filename(12,:) = '015'; filename(13,:) = '014'; filename(14,:) = '013'; filename(15,:) = '012'; filename(16,:) = '011'; filename(17,:) = '010'; AxisIndex = [100,90,80,70,60,50,40,30,20,18,16,15,14,13,12,11,10]; labelX = 'Fiber Content (%)'; elseif select == 6 directname = 'C:\Data\04-07-03\pulp\' filename(1,:) = '10'; filename(2,:) = '09'; filename(3,:) = '08'; filename(4,:) = '07'; AxisIndex = [10,09,08,07]; labelX = 'Fiber Content (%)'; elseif select == 7 directname = 'C:\Data\04-07-03\TiO2\' filename(1,:) = '000'; filename(2,:) = '001'; filename(3,:) = '002'; filename(4,:) = '003'; filename(5,:) = '004'; filename(6,:) = '005'; filename(7,:) = '006'; filename(8,:) = '007'; AxisIndex = [0,1,2,3,4,5,6,7]; labelX = 'TiO_2 Content (%)'; elseif select == 8 %%%%%%%%%%%%%% Clay directname = 'C:\Data\06-16-03\' filename(1,:) = '00'; filename(2,:) = '01'; filename(3,:) = '02'; filename(4,:) = '03'; filename(5,:) = '04'; filename(6,:) = '05'; AxisIndex = [0,1,2,3,4,5]; labelX = 'Clay Content (%)'; elseif select == 9 %%%%%%%%%%%% CaCO3 directname = 'C:\Data\06-23-03\CaCO3\' filename(1,:) = '00'; filename(2,:) = '05'; filename(3,:) = '10'; filename(4,:) = '15'; filename(5,:) = '20'; filename(6,:) = '25'; AxisIndex = [0,0.5,1,1.5,2,2.5]; 102 labelX = 'CaCO_3 Content (%)'; end start = 10; stop = 25; % <-- the starting index. % "Time (days)" "Frequency" "Voltage" "Current" "Phase" "Resistance" "Capacitance" time_ind = 1; fre_ind = 2; volt_ind = 3; curr_ind = 4; phase_ind = 5; resis_ind = 6; cap_ind = 7; % Pre-Processing Each File [no_of_files, temp] = size(filename); for Count = 1:no_of_files tempdata = load([directname filename(Count,:) '.txt']); fre1 = tempdata(:, fre_ind); volt1 = tempdata(:, volt_ind); curr1 = tempdata(:, curr_ind); phase1 = tempdata(:, phase_ind); resis1 = tempdata(:, resis_ind); cap1 = tempdata(:, cap_ind); % % convert the unit of capacitance from (F) to PF. cap1 = cap1*(10^12); % Segment into Individual Sweeps fre1_seg = buffer(fre1, 25); volt1_seg = buffer(volt1, 25); curr1_seg = buffer(curr1, 25); phase1_seg = buffer(phase1, 25); resis1_seg = buffer(resis1, 25); cap1_seg = buffer(cap1, 25); % Remove the low frequency data fre1_seg = fre1_seg(start:stop, :); volt1_seg = volt1_seg(start:stop,:); curr1_seg = curr1_seg(start:stop, :); phase1_seg = phase1_seg(start:stop, :); resis1_seg = resis1_seg(start:stop, :); cap1_seg = cap1_seg(start:stop, :); % Averaging the data across Sweeps fre1_avrg = mean(fre1_seg, 2); volt1_avrg = mean(volt1_seg, 2); curr1_avrg = mean(curr1_seg, 2); 103 phase1_avrg = mean(phase1_seg, 2); resis1_avrg = mean(resis1_seg, 2); cap1_avrg = mean(cap1_seg, 2); cap_std = std(cap1_seg,0, 2); %Convert F to pF cap1_avrg = cap1_avrg .* 1e12; % Obtain Conductance from Resistance cndut1_avrg = 1./resis1_avrg; % Calculating ratio of Conductance and Angular Frequency ratio_of_cndut_and_freq_avrg = cndut1_avrg./(fre1_avrg); % Calculating tandelta tandelta = 1./ ((2*pi*fre1_avrg) .* (cap1_avrg) .* (resis1_avrg)); % Calculating Capacitance / Conductance ratio_of_cap_to_cond = cap1_avrg ./ cndut1_avrg; % Calculating Admittance Yreal = cndut1_avrg; w = 2*pi*fre1_avrg; Yimg = w .* cap1_avrg; Y = complex(Yreal,Yimg); Ymag = abs(Y); % Calculating Admittance Z = 1 ./ Y; Zimg = imag(Z); Zreal = real(Z); Zmag = abs(Z); % Creating AxisMatrix [rows,cols] = size(cap1_avrg); for n = 1:rows for m = 1:cols AxisMatrix(n,m) = AxisIndex(Count); end end % % Scaled Capacitance mincap(Count) = min(cap1_avrg); normalised_cap = cap1_avrg - mincap(Count); normalised_cap = normalised_cap ./ max(normalised_cap); dynamicrange(Count) = max(normalised_cap); % Scaled Conductance mincond(Count) = min(ratio_of_cndut_and_freq_avrg); normalised_condbyw = ratio_of_cndut_and_freq_avrg mincond(Count) ; 104 % normalised_condbyw = normalised_condbyw ./ max(normalised_condbyw); % Scaled Phase minphase(Count) = min(phase1_avrg); normalised_phase = phase1_avrg ./ minphase(Count) ; % Ratio of Capacitance to Scaled Conductance Ratio_cap_to_scaled_Cond = cap1_avrg ./ normalised_condbyw; % Calculating the Min and Max Capacitance cap_min = cap1_avrg - (1e12 .* min(cap1_seg,[],2)); cap_max = (1e12 .* max(cap1_seg,[],2)) - cap1_avrg; Moisture_Content = 100 - AxisMatrix; % Store the Processed data in a 3-D Matrix Data(Count,:,1) = fre1_avrg; Data(Count,:,2) = volt1_avrg; Data(Count,:,3) = curr1_avrg; Data(Count,:,4) = phase1_avrg; Data(Count,:,5) = resis1_avrg; Data(Count,:,6) = cap1_avrg; Data(Count,:,7) = cndut1_avrg; Data(Count,:,8) = ratio_of_cndut_and_freq_avrg; Data(Count,:,9) = tandelta; Data(Count,:,10) = AxisMatrix; Data(Count,:,11) = Yimg; Data(Count,:,12) = Yreal; Data(Count,:,13) = Ymag; Data(Count,:,14) = -1 .* Zimg; Data(Count,:,15) = Zreal; Data(Count,:,16) = Zmag; Data(Count,:,17) = cap_std .* 1e12; Data(Count,:,18) = cap_min; Data(Count,:,19) = cap_max; Data(Count,:,20) = Moisture_Content; end % Fitting Data and Ploting them figurenumber = 1; figure(figurenumber); figurenumber = figurenumber + 1; subplot(2,2,1); figurenumber = surfplotsfunc(Data,1,20,13,'Frequency (Hz)',labelX,'Admittance (S)','Admittance Plot',figurenumber); subplot(2,2,2); figurenumber = surfplotsfunc(Data,1,20,4,'Frequency (Hz)',labelX,'Phase (deg)','Phase Plot',figurenumber); subplot(2,2,3); 105 figurenumber = surfplotsfunc(Data,1,20,6,'Frequency (Hz)',labelX,'Capacitance (F)','Capacitance Plot',figurenumber); subplot(2,2,4); figurenumber = surfplotsfunc(Data,1,20,8,'Frequency (Hz)',labelX,'Conductance (mho/Hz)','Conductance Plot',figurenumber); figure(figurenumber); figurenumber = figurenumber + 1; subplot(1,2,1); figurenumber = plotallfiles(Data,filename,12,11,'Re[Y], [ohms]','Im[Y], [ohms]','Capacitance Plot',figurenumber); subplot(1,2,2); figurenumber = plotallfiles(Data,filename,15,14,'Re[Z], [ohms]','Im[Z], [ohms]','Capacitance Plot',figurenumber); FrequencyToBeUsed = [2,4,6,8,10,12]; figurenumber = plotacrossfiles(Data,FrequencyToBeUsed,6,10,'Capacitance (pF)',labelX,'Capacitance Plot',figurenumber); figurenumber = plotacrossfiles(Data,FrequencyToBeUsed,8,10,'Conductance (mho/Hz)',labelX,'Conductance Plot',figurenumber); figure(figurenumber); figurenumber = figurenumber + 1; FrequencyToBeUsed = 6; errorbar( Data(:,FrequencyToBeUsed,20), Data(:,FrequencyToBeUsed,6), Data(:,FrequencyToBeUsed,17)/2, Data(:,FrequencyToBeUsed,17)/2); grid on; xlabel('Moisture Concentration (%)'); ylabel('Capacitance (pF)'); axis tight; 106 3. SurfPlotFunc.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%% %%%%%% %%%%% %%%%%% %%%%% Function to prepare 3D Plots %%%%%% %%%%% %%%%%% %%%%% %%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [figurenumber] = surfplotsfunc (Data,indexX,indexY,indexZ,labelX,labelY,labelZ,Title,figurenumber) % Ploting Phase, Axisindex and Frequency in 3D % figure(figurenumber) colormap([0 0 0]); mesh (Data(:,:,indexX),Data(:,:,indexY), Data(:,:,indexZ)); xlabel(labelX); ylabel(labelY); zlabel(labelZ); % title(Title); axis tight; orient landscape; set(gca, 'XScale', 'log'); figurenumber = figurenumber; 107 4. PlotAllFiles.m function [figurenumber] = plotallfiles(Data,filename,indexX,indexY,labelX,labelY,titlestr,figuren umber) % Ploting IndexY Vs IndexX for all the files attrib(1,:) = 'ko- '; attrib(2,:) = 'k.: '; attrib(3,:) = 'kx-.'; attrib(4,:) = 'k+--'; attrib(5,:) = 'k*- '; attrib(6,:) = 'ks: '; attrib(7,:) = 'kd-.'; attrib(8,:) = 'kv--'; attrib(9,:) = 'kp- '; attrib(10,:) = 'kh: '; attrib(11,:) = 'k^-.'; attrib(12,:) = 'k<--'; attrib(13,:) = 'k>- '; attrib(14,:) = 'k.: '; attrib(15,:) = 'ko-.'; attrib(16,:) = 'kx--'; attrib(17,:) = 'k+- '; attrib(18,:) = 'k*: '; attrib(19,:) = 'kd-.'; attrib(20,:) = 'kd--'; attrib(21,:) = 'kv- '; attrib(22,:) = 'kp: '; attrib(23,:) = 'kh-.'; attrib(24,:) = 'k^--'; [no_of_files,no_of_freq,no_of_parameters] = size(Data) % figure(figurenumber) plot(Data(1,:,indexX), Data(1,:,indexY),attrib(1,:)); hold on for Count = 2:no_of_files plot(Data(Count,:,indexX), Data(Count,:,indexY),attrib(Count,:) ); end hold off xlabel(labelX); ylabel(labelY); % title(titlestr); legend(filename); axis square; grid on; orient landscape; % set(gca, 'XScale', 'log'); % figurenumber = figurenumber + 1; 108 5. PlotAcrossFiles.m function [figurenumber] = plotacrossfiles(Data,FrequencyIndex,indexX,indexY,labelX,labelY,titlest r,figurenumber) % Ploting IndexY Vs IndexX for all the files attrib(1,:) = 'ko- '; attrib(2,:) = 'k.: '; attrib(3,:) = 'kx-.'; attrib(4,:) = 'k+--'; attrib(5,:) = 'k*- '; attrib(6,:) = 'ks: '; attrib(7,:) = 'kd-.'; attrib(8,:) = 'kv--'; attrib(9,:) = 'kp- '; attrib(10,:) = 'kh: '; attrib(11,:) = 'k^-.'; attrib(12,:) = 'k<--'; attrib(13,:) = 'k>- '; attrib(14,:) = 'k.: '; attrib(15,:) = 'ko-.'; attrib(16,:) = 'kx--'; attrib(17,:) = 'k+- '; attrib(18,:) = 'k*: '; attrib(19,:) = 'kd-.'; attrib(20,:) = 'kd--'; attrib(21,:) = 'kv- '; attrib(22,:) = 'kp: '; attrib(23,:) = 'kh-.'; attrib(24,:) = 'k^--'; [no_of_files,no_of_freq,no_of_parameters] = size(Data) [Temp,no_of_plots] = size(FrequencyIndex); for Count = 1:no_of_plots legendmatrix(Count,:) = sprintf('%1.3e',Data(1,FrequencyIndex(Count),1)); end figure(figurenumber) plot(Data(:,FrequencyIndex(1),indexX), Data(:,FrequencyIndex(1),indexY),attrib(1,:)); hold on; for Count = 2:no_of_plots plot(Data(:,FrequencyIndex(Count),indexX), Data(:,FrequencyIndex(Count),indexY),attrib(Count,:)); legendmatrix(Count,:) = sprintf('%1.3e',Data(1,FrequencyIndex(Count),1)); end hold off; 109 xlabel(labelX); ylabel(labelY); title(titlestr); legend(legendmatrix); axis tight; grid on; orient landscape; figurenumber = figurenumber + 1; 110 6. TitaniumDioxideCalculations.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%% %%%%%% %%%%% %%%%%% %%%%% This program computes the moisture %%%%%% %%%%% concentration in presence of TiO2 %%%%%% %%%%% %%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear all; close all; % Set font size. set(0, 'DefaultAxesFontSize',20) set(0, 'DefaultTextFontSize',20) % Initializing file names. select = 2; if select == 1 directname = 'C:\Data\01-23-03\' filename(1,:) = '00'; filename(2,:) = '05'; filename(3,:) = '10'; filename(4,:) = '20'; filename(5,:) = '30'; filename(6,:) = '40'; AxisIndex = [0,0.5,1.0,2.0,3.0,4.0]; PaperConc = [10,9.5,9,8,7,6]; MoistureConc = [90,90,90,90,90,90]; elseif select == 2 directname = 'C:\Data\04-07-03\TiO2\' filename(1,:) = '000'; filename(2,:) = '001'; filename(3,:) = '002'; filename(4,:) = '003'; filename(5,:) = '004'; filename(6,:) = '005'; filename(7,:) = '006'; filename(8,:) = '007'; AxisIndex = [0,1,2,3,4,5,6,7]; PaperConc = [7,6.93,6.86,6.79,6.72,6.65,6.58,6.51]; MoistureConc = [93,92.07,91.14,90.21,89.28,88.35,87.42,86.49]; end 111 start = 11; stop = 25; % <-- the starting index. % "Time (days)" "Frequency" "Voltage" "Current" "Phase" "Resistance" "Capacitance" time_ind = 1; fre_ind = 2; volt_ind = 3; curr_ind = 4; phase_ind = 5; resis_ind = 6; cap_ind = 7; % Pre-Processing Each File [no_of_files, temp] = size(filename); for Count = 1:no_of_files tempdata = load([directname filename(Count,:) '.txt']); fre1 = tempdata(:, fre_ind); volt1 = tempdata(:, volt_ind); curr1 = tempdata(:, curr_ind); phase1 = tempdata(:, phase_ind); resis1 = tempdata(:, resis_ind); cap1 = tempdata(:, cap_ind); % convert the unit of capacitance from (F) to PF. cap1 = cap1*(10^12); % Segment into Individual Sweeps fre1_seg = buffer(fre1, 25); volt1_seg = buffer(volt1, 25); curr1_seg = buffer(curr1, 25); phase1_seg = buffer(phase1, 25); resis1_seg = buffer(resis1, 25); cap1_seg = buffer(cap1, 25); % Remove the low frequency data fre1_seg = fre1_seg(start:stop, :); volt1_seg = volt1_seg(start:stop,:); curr1_seg = curr1_seg(start:stop, :); phase1_seg = phase1_seg(start:stop, :); resis1_seg = resis1_seg(start:stop, :); cap1_seg = cap1_seg(start:stop, :); % Averaging the data across Sweeps fre1_avrg = mean(fre1_seg, 2); volt1_avrg = mean(volt1_seg, 2); curr1_avrg = mean(curr1_seg, 2); phase1_avrg = mean(phase1_seg, 2); resis1_avrg = mean(resis1_seg, 2); cap1_avrg = mean(cap1_seg, 2); % Obtain Conductance from Resistance 112 cndut1_avrg = 1e12 ./resis1_avrg; %coverting to pico % Calculating ratio of Conductance and Angular Frequency ratio_of_cndut_and_freq_avrg = cndut1_avrg./(2*pi*fre1_avrg); % Calculating tandelta tandelta = 1./ ((2*pi*fre1_avrg) .* (cap1_avrg) .* (resis1_avrg)); % Calculating Capacitance / Conductance ratio_of_cap_to_cond = cap1_avrg ./ cndut1_avrg; % Calculatiing Imaginary part of Admittance Yimaginary = cap1_avrg .* (2*pi*fre1_avrg); % Creating AxisMatrix [rows,cols] = size(cap1_avrg); for n = 1:rows for m = 1:cols AxisMatrix(n,m) = AxisIndex(Count); end end % % Scaled Capacitance mincap(Count) = min(cap1_avrg); normalised_cap = cap1_avrg - mincap(Count); normalised_cap = normalised_cap ./ max(normalised_cap); dynamicrange(Count) = max(normalised_cap); % Scaled Conductance mincond(Count) = min(ratio_of_cndut_and_freq_avrg); normalised_condbyw = ratio_of_cndut_and_freq_avrg mincond(Count) ; % normalised_condbyw = normalised_condbyw ./ max(normalised_condbyw); % Scaled Phase minphase(Count) = min(phase1_avrg); normalised_phase = phase1_avrg ./ minphase(Count) ; % Ratio of Capacitance to Scaled Conductance Ratio_cap_to_scaled_Cond = cap1_avrg ./ normalised_condbyw; % Store the Processed data in a 3-D Matrix Data(Count,:,1) = fre1_avrg; Data(Count,:,2) = volt1_avrg; Data(Count,:,3) = curr1_avrg; Data(Count,:,4) = phase1_avrg; Data(Count,:,5) = resis1_avrg; Data(Count,:,6) = cap1_avrg; Data(Count,:,7) = cndut1_avrg; Data(Count,:,8) = ratio_of_cndut_and_freq_avrg; Data(Count,:,9) = Yimaginary; 113 Data(Count,:,10) Data(Count,:,11) Data(Count,:,12) Data(Count,:,13) Data(Count,:,14) Data(Count,:,15) Data(Count,:,16) = = = = = = = AxisMatrix; tandelta; ratio_of_cap_to_cond; normalised_cap; normalised_condbyw; normalised_phase; Ratio_cap_to_scaled_Cond; end % Fitting Data and Ploting them figurenumber = 1; var1 = 6; var2 = 8; freq = 1; [error,constants] = TwoVariableLinearFitFunc(Data(2:no_of_files,freq,var1),(Data(2:no_of_fi les,freq,var2)),Data(2:no_of_files,freq,10)); y1 = TwoVariableLinearEvalFunc(constants,Data(1:no_of_files,freq,var1),Data( 1:no_of_files,freq,var2)); if error == 1 y1 = y1 .* 0; end figure(figurenumber) figurenumber = figurenumber + 1; plot(Data(1:no_of_files,1,10),y1,'b*'); hold on; plot(Data(:,1,10),Data(:,1,10),'ro'); hold off; grid on; title('Tio2 Concentration'); xlabel('Actual (%)'); ylabel('Estimate (%)'); [error,constants] = TwoVariableLinearFitFunc(Data(2:no_of_files,freq,var1),(Data(2:no_of_fi les,freq,var2)),MoistureConc(2:no_of_files)'); y1 = TwoVariableLinearEvalFunc(constants,Data(1:no_of_files,freq,var1),Data( 1:no_of_files,freq,var2)); if error == 1 y1 = y1 .* 0; end figure(figurenumber) figurenumber = figurenumber + 1; plot(MoistureConc,y1,'b*'); hold on; plot(MoistureConc,MoistureConc,'ro'); hold off; grid on; title('Moisture Concentration'); xlabel('Actual (%)'); ylabel('Estimate (%)'); [error,constants] = TwoVariableLinearFitFunc(Data(2:no_of_files,freq,var1),(Data(2:no_of_fi les,freq,var2)),PaperConc(2:no_of_files)'); 114 y1 = TwoVariableLinearEvalFunc(constants,Data(1:no_of_files,freq,var1),Data( 1:no_of_files,freq,var2)); if error == 1 y1 = y1 .* 0; end figure(figurenumber) figurenumber = figurenumber + 1; plot(PaperConc,y1,'bo'); hold on; plot(PaperConc,PaperConc,'ro'); hold off; grid on; title('Paper Concentration'); xlabel('Actual (%)'); ylabel('Estimate (%)'); % figurenumber = surfplotsfunc(Data,1,10,8,'Frequency (Hz)','Fiber Concentration (%)','Conductance (mho/rad)','Conductance Plot',figurenumber); % figurenumber = surfplotsfunc(Data,1,10,6,'Frequency (Hz)','Fiber Concentration ()','Capacitance (pF)','Capacitance Plot',figurenumber); % figurenumber = surfplotsfunc(Data,1,10,11,'Frequency (Hz)','Fiber Concentration (%)','Dissipation Factor','Dissipation Factor Plot',figurenumber); % figurenumber = surfplotsfunc(Data,1,10,4,'Frequency (Hz)','Fiber Concentration (%)','Phase (deg)','Phase Plot',figurenumber); % figurenumber = surfplotsfunc(Data,1,10,12,'Frequency (Hz)','Fiber Concentration (%)','Capacitance / Conductance (pF/S)','Capacitance/Conducatance Plot',figurenumber); % figurenumber = plotallfiles(Data,filename,1,6,'Frequency, f (Hz)','Capacitance, C (pF)','Capacitance Plot',figurenumber); % figurenumber = plotallfiles(Data,filename,1,8,'Frequency, f (Hz)','Conductance, S (mho/rad)','Conductance Plot',figurenumber); % figurenumber = plotallfiles(Data,filename,1,4,'Frequency (Hz)','Phase (Deg)','Phase Plot',figurenumber); % [temp_matrix,error,figurenumber] = datafittingfunc(Data,7,AxisIndex,figurenumber,'Ratio of Conductances','Percentage (%)',' ',5); % [temp_matrix,error,figurenumber] = datafittingfunc(Data,6,AxisIndex,figurenumber,'Ratio of Capacitance','Percentage (%)',' ',5);% % [temp_matrix,error,figurenumber] = datafittingfunc(Data,11,AxisIndex,figurenumber,'Tan delta','Percentage (%)',' ',5); % [temp_matrix,error,figurenumber] = datafittingfunc(Data,4,AxisIndex,figurenumber,'Phase (deg)','Percentage (%)',' ',5); % [temp_matrix,error,figurenumber] = datafittingfunc(Data,12,AxisIndex,figurenumber,'Ratio of Capacitance to Condunctance (pf/S)','Percentage (%)',' ',5); % FrequencyToBeUsed = [1]; % figurenumber = plotacrossfiles(Data,FrequencyToBeUsed,10,6,'Paper Content (%)','Capacitance (pf)','Capacitance Plot',figurenumber); 115 % figurenumber = plotacrossfiles(Data,FrequencyToBeUsed,10,8,'Paper Content (%)','Conductance (mho/rad)','Conductance Plot',figurenumber); % figurenumber = plotacrossfiles(Data,FrequencyToBeUsed,10,4,'Paper Content (%)','Tan Delta','Tan delta Plot',figurenumber); % figurenumber = linearfitfunc(Data,10,5,figurenumber,'Actual Fiber Content(%)','Estimated Fiber Content(%)','Fit Using Capacitance'); % figurenumber = linearfitfunc(Data,10,4,figurenumber,'Actual Fiber Content(%)','Estimated Fiber Content(%)','Fit Using Scaled Cond'); % figurenumber = linearfitfunc(Data,10,15,figurenumber,'Actual Fiber Content(%)','Estimated Fiber Content(%)','Fit Using Phase'); 116 7. ClayCalculations.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%% %%%%%% %%%%% %%%%%% %%%%% This program computes the moisture %%%%%% %%%%% concentration in presence of Clay %%%%%% %%%%% %%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear all; close all; % Set font size. set(0, 'DefaultAxesFontSize',20) set(0, 'DefaultTextFontSize',20) % Initializing file names. select = 1; if select == 1 directname = 'C:\Data\06-16-03\' filename(1,:) = '00'; filename(2,:) = '01'; filename(3,:) = '02'; filename(4,:) = '03'; filename(5,:) = '04'; filename(6,:) = '05'; AxisIndex = [0.0,1.0,2.0,3.0,4.0,5.0]; PaperConc = [10,9,8,7,6,5]; MoistureConc = [90,90,90,90,90,90]; end start = 11; stop = 25; % <-- the starting index. % "Time (days)" "Frequency" "Voltage" "Current" "Phase" "Resistance" "Capacitance" time_ind = 1; fre_ind = 2; volt_ind = 3; curr_ind = 4; phase_ind = 5; 117 resis_ind = 6; cap_ind = 7; % Pre-Processing Each File [no_of_files, temp] = size(filename); for Count = 1:no_of_files tempdata = load([directname filename(Count,:) '.txt']); fre1 = tempdata(:, fre_ind); volt1 = tempdata(:, volt_ind); curr1 = tempdata(:, curr_ind); phase1 = tempdata(:, phase_ind); resis1 = tempdata(:, resis_ind); cap1 = tempdata(:, cap_ind); % convert the unit of capacitance from (F) to PF. cap1 = cap1*(10^12); % Segment into Individual Sweeps fre1_seg = buffer(fre1, 25); volt1_seg = buffer(volt1, 25); curr1_seg = buffer(curr1, 25); phase1_seg = buffer(phase1, 25); resis1_seg = buffer(resis1, 25); cap1_seg = buffer(cap1, 25); % Remove the low frequency data fre1_seg = fre1_seg(start:stop, :); volt1_seg = volt1_seg(start:stop,:); curr1_seg = curr1_seg(start:stop, :); phase1_seg = phase1_seg(start:stop, :); resis1_seg = resis1_seg(start:stop, :); cap1_seg = cap1_seg(start:stop, :); % Averaging the data across Sweeps fre1_avrg = mean(fre1_seg, 2); volt1_avrg = mean(volt1_seg, 2); curr1_avrg = mean(curr1_seg, 2); phase1_avrg = mean(phase1_seg, 2); resis1_avrg = mean(resis1_seg, 2); cap1_avrg = mean(cap1_seg, 2); % Obtain Conductance from Resistance cndut1_avrg = 1e12 ./resis1_avrg; %coverting to pico % Calculating ratio of Conductance and Angular Frequency ratio_of_cndut_and_freq_avrg = cndut1_avrg./(2*pi*fre1_avrg); % Calculating tandelta tandelta = 1./ ((2*pi*fre1_avrg) .* (cap1_avrg) .* (resis1_avrg)); % Calculating Capacitance / Conductance 118 ratio_of_cap_to_cond = cap1_avrg ./ cndut1_avrg; % Calculatiing Imaginary part of Admittance Yimaginary = cap1_avrg .* (2*pi*fre1_avrg); % Creating AxisMatrix [rows,cols] = size(cap1_avrg); for n = 1:rows for m = 1:cols AxisMatrix(n,m) = AxisIndex(Count); end end % % Scaled Capacitance mincap(Count) = min(cap1_avrg); normalised_cap = cap1_avrg - mincap(Count); normalised_cap = normalised_cap ./ max(normalised_cap); dynamicrange(Count) = max(normalised_cap); % Scaled Conductance mincond(Count) = min(ratio_of_cndut_and_freq_avrg); normalised_condbyw = ratio_of_cndut_and_freq_avrg mincond(Count) ; % normalised_condbyw = normalised_condbyw ./ max(normalised_condbyw); % Scaled Phase minphase(Count) = min(phase1_avrg); normalised_phase = phase1_avrg ./ minphase(Count) ; % Ratio of Capacitance to Scaled Conductance Ratio_cap_to_scaled_Cond = cap1_avrg ./ normalised_condbyw; % Store the Processed data in a 3-D Matrix Data(Count,:,1) = fre1_avrg; Data(Count,:,2) = volt1_avrg; Data(Count,:,3) = curr1_avrg; Data(Count,:,4) = phase1_avrg; Data(Count,:,5) = resis1_avrg; Data(Count,:,6) = cap1_avrg; Data(Count,:,7) = cndut1_avrg; Data(Count,:,8) = ratio_of_cndut_and_freq_avrg; Data(Count,:,9) = Yimaginary; Data(Count,:,10) = AxisMatrix; Data(Count,:,11) = tandelta; Data(Count,:,12) = ratio_of_cap_to_cond; Data(Count,:,13) = normalised_cap; Data(Count,:,14) = normalised_condbyw; Data(Count,:,15) = normalised_phase; Data(Count,:,16) = Ratio_cap_to_scaled_Cond; end % Fitting Data and Ploting them 119 figurenumber = 1; var1 = 4; var2 = 8; freq = 8; [error,constants] = TwoVariableLinearFitFunc(Data(2:no_of_files,freq,var1),(Data(2:no_of_fi les,freq,var2)),Data(2:no_of_files,freq,10)); y1 = TwoVariableLinearEvalFunc(constants,Data(1:no_of_files,freq,var1),Data( 1:no_of_files,freq,var2)); if error == 1 y1 = y1 .* 0; end figure(figurenumber) figurenumber = figurenumber + 1; plot(Data(1:no_of_files,1,10),y1,'k*'); hold on; plot(Data(:,1,10),Data(:,1,10),'ko-'); hold off; grid on; title('Clay Concentration'); xlabel('Actual Clay Concentration (%)'); ylabel('Estimated Clay Concentration (%)'); [error,constants] = TwoVariableLinearFitFunc(Data(2:no_of_files,freq,var1),(Data(2:no_of_fi les,freq,var2)),MoistureConc(2:no_of_files)'); y1 = TwoVariableLinearEvalFunc(constants,Data(1:no_of_files,freq,var1),Data( 1:no_of_files,freq,var2)); if error == 1 y1 = y1 .* 0; end figure(figurenumber) figurenumber = figurenumber + 1; plot(MoistureConc,y1,'k*'); hold on; plot(MoistureConc,MoistureConc,'ro'); hold off; grid on; title('Moisture Concentration'); xlabel('Actual Mositure Concentration (%)'); ylabel('Estimated Moisture Concentration (%)'); [error,constants] = TwoVariableLinearFitFunc(Data(2:no_of_files,freq,var1),(Data(2:no_of_fi les,freq,var2)),PaperConc(2:no_of_files)'); y1 = TwoVariableLinearEvalFunc(constants,Data(1:no_of_files,freq,var1),Data( 1:no_of_files,freq,var2)); if error == 1 y1 = y1 .* 0; end figure(figurenumber) figurenumber = figurenumber + 1; plot(PaperConc,y1,'ko'); hold on; plot(PaperConc,PaperConc,'ro'); hold off; grid on; 120 title('Paper Concentration'); xlabel('Actual Fiber Concentration (%)'); ylabel('Estimated Fiber Concentration (%)'); 121 8. CalciumCarbonateCalculations.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%% %%%%%% %%%%% %%%%%% %%%%% This program computes the moisture %%%%%% %%%%% concentration in presence of CaCO3 %%%%%% %%%%% %%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear all; close all; % Set font size. set(0, 'DefaultAxesFontSize',20) set(0, 'DefaultTextFontSize',20) % Initializing file names. select = 1; if select == 1 directname = 'C:\Data\06-23-03\CaCO3\' filename(1,:) = '00'; filename(2,:) = '05'; filename(3,:) = '10'; filename(4,:) = '15'; filename(5,:) = '20'; filename(6,:) = '25'; AxisIndex = [0.0,0.5,1.0,1.5,2.0,2.5]; PaperConc = [10,9.5,9,8.5,8,7.5]; MoistureConc = [90,90,90,90,90,90]; end start = 11; stop = 25; % <-- the starting index. % "Time (days)" "Frequency" "Voltage" "Current" "Phase" "Resistance" "Capacitance" time_ind = 1; fre_ind = 2; volt_ind = 3; curr_ind = 4; phase_ind = 5; 122 resis_ind = 6; cap_ind = 7; % Pre-Processing Each File [no_of_files, temp] = size(filename); for Count = 1:no_of_files tempdata = load([directname filename(Count,:) '.txt']); fre1 = tempdata(:, fre_ind); volt1 = tempdata(:, volt_ind); curr1 = tempdata(:, curr_ind); phase1 = tempdata(:, phase_ind); resis1 = tempdata(:, resis_ind); cap1 = tempdata(:, cap_ind); % convert the unit of capacitance from (F) to PF. cap1 = cap1*(10^12); % Segment into Individual Sweeps fre1_seg = buffer(fre1, 25); volt1_seg = buffer(volt1, 25); curr1_seg = buffer(curr1, 25); phase1_seg = buffer(phase1, 25); resis1_seg = buffer(resis1, 25); cap1_seg = buffer(cap1, 25); % Remove the low frequency data fre1_seg = fre1_seg(start:stop, :); volt1_seg = volt1_seg(start:stop,:); curr1_seg = curr1_seg(start:stop, :); phase1_seg = phase1_seg(start:stop, :); resis1_seg = resis1_seg(start:stop, :); cap1_seg = cap1_seg(start:stop, :); % Averaging the data across Sweeps fre1_avrg = mean(fre1_seg, 2); volt1_avrg = mean(volt1_seg, 2); curr1_avrg = mean(curr1_seg, 2); phase1_avrg = mean(phase1_seg, 2); resis1_avrg = mean(resis1_seg, 2); cap1_avrg = mean(cap1_seg, 2); % Obtain Conductance from Resistance cndut1_avrg = 1e12 ./resis1_avrg; %coverting to pico % Calculating ratio of Conductance and Angular Frequency ratio_of_cndut_and_freq_avrg = cndut1_avrg./(2*pi*fre1_avrg); % Calculating tandelta tandelta = 1./ ((2*pi*fre1_avrg) .* (cap1_avrg) .* (resis1_avrg)); % Calculating Capacitance / Conductance 123 ratio_of_cap_to_cond = cap1_avrg ./ cndut1_avrg; % Calculatiing Imaginary part of Admittance Yimaginary = cap1_avrg .* (2*pi*fre1_avrg); % Creating AxisMatrix [rows,cols] = size(cap1_avrg); for n = 1:rows for m = 1:cols AxisMatrix(n,m) = AxisIndex(Count); end end % % Scaled Capacitance mincap(Count) = min(cap1_avrg); normalised_cap = cap1_avrg - mincap(Count); normalised_cap = normalised_cap ./ max(normalised_cap); dynamicrange(Count) = max(normalised_cap); % Scaled Conductance mincond(Count) = min(ratio_of_cndut_and_freq_avrg); normalised_condbyw = ratio_of_cndut_and_freq_avrg mincond(Count) ; % normalised_condbyw = normalised_condbyw ./ max(normalised_condbyw); % Scaled Phase minphase(Count) = min(phase1_avrg); normalised_phase = phase1_avrg ./ minphase(Count) ; % Ratio of Capacitance to Scaled Conductance Ratio_cap_to_scaled_Cond = cap1_avrg ./ normalised_condbyw; % Store the Processed data in a 3-D Matrix Data(Count,:,1) = fre1_avrg; Data(Count,:,2) = volt1_avrg; Data(Count,:,3) = curr1_avrg; Data(Count,:,4) = phase1_avrg; Data(Count,:,5) = resis1_avrg; Data(Count,:,6) = cap1_avrg; Data(Count,:,7) = cndut1_avrg; Data(Count,:,8) = ratio_of_cndut_and_freq_avrg; Data(Count,:,9) = Yimaginary; Data(Count,:,10) = AxisMatrix; Data(Count,:,11) = tandelta; Data(Count,:,12) = ratio_of_cap_to_cond; Data(Count,:,13) = normalised_cap; Data(Count,:,14) = normalised_condbyw; Data(Count,:,15) = normalised_phase; Data(Count,:,16) = Ratio_cap_to_scaled_Cond; end % Fitting Data and Ploting them 124 figurenumber = 1; var1 = 4; var2 = 8; freq = 8; [error,constants] = TwoVariableLinearFitFunc(Data(2:no_of_files,freq,var1),(Data(2:no_of_fi les,freq,var2)),Data(2:no_of_files,freq,10)); y1 = TwoVariableLinearEvalFunc(constants,Data(1:no_of_files,freq,var1),Data( 1:no_of_files,freq,var2)); if error == 1 y1 = y1 .* 0; end figure(figurenumber) figurenumber = figurenumber + 1; plot(Data(1:no_of_files,1,10),y1,'k*'); hold on; plot(Data(:,1,10),Data(:,1,10),'ko-'); hold off; grid on; title('CaCO_3 Concentration'); xlabel('Actual CaCO_3 Concentration (%)'); ylabel('Estimated CaCO_3 Concentration (%)'); [error,constants] = TwoVariableLinearFitFunc(Data(2:no_of_files,freq,var1),(Data(2:no_of_fi les,freq,var2)),PaperConc(2:no_of_files)'); y1 = TwoVariableLinearEvalFunc(constants,Data(1:no_of_files,freq,var1),Data( 1:no_of_files,freq,var2)); if error == 1 y1 = y1 .* 0; end figure(figurenumber) figurenumber = figurenumber + 1; plot(PaperConc,y1,'ko'); hold on; plot(PaperConc,PaperConc,'ro'); hold off; grid on; title('Paper Concentration'); xlabel('Actual Fiber Concentration (%)'); ylabel('Estimated Fiber Concentration (%)'); [error,constants] = TwoVariableLinearFitFunc(Data(2:no_of_files,freq,var1),(Data(2:no_of_fi les,freq,var2)),MoistureConc(2:no_of_files)'); y1 = TwoVariableLinearEvalFunc(constants,Data(1:no_of_files,freq,var1),Data( 1:no_of_files,freq,var2)); if error == 1 y1 = y1 .* 0; end figure(figurenumber) figurenumber = figurenumber + 1; plot(MoistureConc,y1,'k*'); 125 hold on; plot(MoistureConc,MoistureConc,'ro'); hold off; grid on; title('Moisture Concentration'); xlabel('Actual Mositure Concentration (%)'); ylabel('Estimated Moisture Concentration (%)'); 126 9. Repeatability.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%% %%%%%% %%%%% %%%%%% %%%%% Program to test the Repeatability %%%%%% %%%%% %%%%%% %%%%% %%%%%% %%%%% %%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear all; close all; % Set font size. set(0, 'DefaultAxesFontSize',13) set(0, 'DefaultTextFontSize',13) % set(0, 'DefaultLineThick',2.5) % Initializing file names. select = 1; if select == 1 directname = 'C:\Data\06-22-03\' filename(1,:) = 'run2'; filename(2,:) = 'run3'; filename(3,:) = 'run4'; filename(4,:) = 'run5'; filename(5,:) = 'run6'; AxisIndex = [1,2,3,4,5]; elseif select == 2 directname = 'C:\Data\06-23-03\Repeatability\' filename(1,:) = '01'; filename(2,:) = '02'; filename(3,:) = '03'; filename(4,:) = '04'; filename(5,:) = '05'; filename(6,:) = '06'; filename(7,:) = '07'; filename(8,:) = '08'; filename(9,:) = '09'; filename(10,:) = '10'; filename(11,:) = '11'; filename(12,:) = '12'; 127 filename(13,:) = '13'; filename(14,:) = '14'; filename(15,:) = '15'; filename(16,:) = '16'; filename(17,:) = '17'; filename(18,:) = '18'; filename(19,:) = '19'; filename(20,:) = '20'; AxisIndex = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]; end start = 13; stop = 25; % <-- the starting index. % "Time (days)" "Frequency" "Voltage" "Current" "Phase" "Resistance" "Capacitance" time_ind = 1; fre_ind = 2; volt_ind = 3; curr_ind = 4; phase_ind = 5; resis_ind = 6; cap_ind = 7; % Pre-Processing Each File [no_of_files, temp] = size(filename); for Count = 1:no_of_files tempdata = load([directname filename(Count,:) '.txt']); fre1 = tempdata(:, fre_ind); volt1 = tempdata(:, volt_ind); curr1 = tempdata(:, curr_ind); phase1 = tempdata(:, phase_ind); resis1 = tempdata(:, resis_ind); cap1 = tempdata(:, cap_ind); % Segment into Individual Sweeps fre1_seg = buffer(fre1, 25); volt1_seg = buffer(volt1, 25); curr1_seg = buffer(curr1, 25); phase1_seg = buffer(phase1, 25); resis1_seg = buffer(resis1, 25); cap1_seg = buffer(cap1, 25); % Remove the low frequency data fre1_seg = fre1_seg(start:stop, :); volt1_seg = volt1_seg(start:stop,:); curr1_seg = curr1_seg(start:stop, :); phase1_seg = phase1_seg(start:stop, :); resis1_seg = resis1_seg(start:stop, :); 128 cap1_seg = cap1_seg(start:stop, :); % Averaging the data across Sweeps fre1_avrg = mean(fre1_seg, 2); volt1_avrg = mean(volt1_seg, 2); curr1_avrg = mean(curr1_seg, 2); phase1_avrg = mean(phase1_seg, 2); resis1_avrg = mean(resis1_seg, 2); cap1_avrg = mean(cap1_seg, 2); % Obtain Conductance from Resistance cndut1_avrg = 1./resis1_avrg; % Calculating ratio of Conductance and Angular Frequency ratio_of_cndut_and_freq_avrg = cndut1_avrg./(fre1_avrg); % Calculating tandelta tandelta = 1./ ((2*pi*fre1_avrg) .* (cap1_avrg) .* (resis1_avrg)); % Calculating Capacitance / Conductance ratio_of_cap_to_cond = cap1_avrg ./ cndut1_avrg; % Calculating Admittance Yreal = cndut1_avrg; w = 2*pi*fre1_avrg; Yimg = w .* cap1_avrg; Y = complex(Yreal,Yimg); Ymag = abs(Y); % Calculating Admittance Z = 1 ./ Y; Zimg = imag(Z); Zreal = real(Z); Zmag = abs(Z); % Creating AxisMatrix [rows,cols] = size(cap1_avrg); for n = 1:rows for m = 1:cols AxisMatrix(n,m) = AxisIndex(Count); end end % Calculating the Min, Max and Std. Deviation of Capacitance cap_min = cap1_avrg - min(cap1_seg,[],2); cap_max = max(cap1_seg,[],2) - cap1_avrg; cap_std = std(cap1_seg,0, 2); % Store the Processed data in a 3-D Matrix Data(Count,:,1) = fre1_avrg; Data(Count,:,2) = volt1_avrg; 129 Data(Count,:,3) = curr1_avrg; Data(Count,:,4) = phase1_avrg; Data(Count,:,5) = resis1_avrg; Data(Count,:,6) = cap1_avrg; Data(Count,:,7) = cndut1_avrg; Data(Count,:,8) = ratio_of_cndut_and_freq_avrg; Data(Count,:,9) = tandelta; Data(Count,:,10) = AxisMatrix; Data(Count,:,11) = Yimg; Data(Count,:,12) = Yreal; Data(Count,:,13) = Ymag; Data(Count,:,14) = -1 .* Zimg; Data(Count,:,15) = Zreal; Data(Count,:,16) = Zmag; Data(Count,:,17) = cap_std; Data(Count,:,18) = cap_min; Data(Count,:,19) = cap_max; end Capacitance = cap1_seg(8,:)'; std_dev = std(Capacitance,0, 1); Mean_cap = mean(Capacitance, 1); [no_of_runs,temp] = size(Capacitance); for n = 1:no_of_runs low(n,1) = Mean_cap - (std_dev/2); low(n,2) = n; end for n = 1:no_of_runs high(n,1) = Mean_cap + (std_dev/2); high(n,2) = n; end for n = 1:no_of_runs mean(n,1) = Mean_cap; mean(n,2) = n; end for n = 1:no_of_runs delta(n,1) = Mean_cap - Capacitance(n,1); mean(n,2) = n; end [n,temp] = size(Capacitance); figure(1); subplot(2,1,1); bar(1:n,Capacitance,'kd-'); xlabel('Trial Number'); Ylabel('Capacitance (F)'); hold on; plot(low(:,2),low(:,1),'k--'); plot(high(:,2),high(:,1),'k--'); plot(mean(:,2),mean(:,1),'k-'); hold off; 130 Grid on; axis([1,no_of_runs,(Mean_cap - (std_dev*2)),(Mean_cap + (std_dev*2))]); subplot(2,1,2); bar(1:n,delta,'k'); xlabel('Trial Number'); Ylabel('Deviation from Mean (F)'); hold on; plot(mean(:,2),(mean(:,1).*0),'k-'); plot(low(:,2),low(:,1)-mean(:,1),'k-'); plot(high(:,2),high(:,1)-mean(:,1),'k-'); hold off; axis([1,no_of_runs,(0 - (std_dev*2)),(0 + (std_dev*2))]); Grid on; 131 10.Reproducability.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%% %%%%%% %%%%% %%%%%% %%%%% Reproducability Test for Fiber %%%%%% %%%%% %%%%%% %%%%% %%%%%% %%%%% %%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear all; close all; % Set font size. set(0, 'DefaultAxesFontSize',13) set(0, 'DefaultTextFontSize',13) % Initializing file names. directname = 'C:\Data\06-22-03\' filename(1,:) = 'run2'; filename(2,:) = 'run3'; filename(3,:) = 'run4'; filename(4,:) = 'run5'; filename(5,:) = 'run6'; AxisIndex = [1,2,3,4,5]; start = 13; stop = 25; % <-- the starting index. % "Time (days)" "Frequency" "Voltage" "Current" "Phase" "Resistance" "Capacitance" time_ind = 1; fre_ind = 2; volt_ind = 3; curr_ind = 4; phase_ind = 5; resis_ind = 6; cap_ind = 7; % Pre-Processing Each File [no_of_files, temp] = size(filename); for Count = 1:no_of_files tempdata = load([directname filename(Count,:) '.txt']); fre1 = tempdata(:, fre_ind); volt1 = tempdata(:, volt_ind); 132 curr1 = tempdata(:, curr_ind); phase1 = tempdata(:, phase_ind); resis1 = tempdata(:, resis_ind); cap1 = tempdata(:, cap_ind); % Segment into Individual Sweeps fre1_seg = buffer(fre1, 25); volt1_seg = buffer(volt1, 25); curr1_seg = buffer(curr1, 25); phase1_seg = buffer(phase1, 25); resis1_seg = buffer(resis1, 25); cap1_seg = buffer(cap1, 25); % Remove the low frequency data fre1_seg = fre1_seg(start:stop, :); volt1_seg = volt1_seg(start:stop,:); curr1_seg = curr1_seg(start:stop, :); phase1_seg = phase1_seg(start:stop, :); resis1_seg = resis1_seg(start:stop, :); cap1_seg = cap1_seg(start:stop, :); % Averaging the data across Sweeps fre1_avrg = mean(fre1_seg, 2); volt1_avrg = mean(volt1_seg, 2); curr1_avrg = mean(curr1_seg, 2); phase1_avrg = mean(phase1_seg, 2); resis1_avrg = mean(resis1_seg, 2); cap1_avrg = mean(cap1_seg, 2); % Obtain Conductance from Resistance cndut1_avrg = 1./resis1_avrg; % Calculating ratio of Conductance and Angular Frequency ratio_of_cndut_and_freq_avrg = cndut1_avrg./(fre1_avrg); % Calculating tandelta tandelta = 1./ ((2*pi*fre1_avrg) .* (cap1_avrg) .* (resis1_avrg)); % Calculating Capacitance / Conductance ratio_of_cap_to_cond = cap1_avrg ./ cndut1_avrg; % Calculating Admittance Yreal = cndut1_avrg; w = 2*pi*fre1_avrg; Yimg = w .* cap1_avrg; Y = complex(Yreal,Yimg); Ymag = abs(Y); % Calculating Admittance Z = 1 ./ Y; 133 Zimg = imag(Z); Zreal = real(Z); Zmag = abs(Z); % Creating AxisMatrix [rows,cols] = size(cap1_avrg); for n = 1:rows for m = 1:cols AxisMatrix(n,m) = AxisIndex(Count); end end % Calculating the Min, Max and Std. Deviation of Capacitance cap_min = cap1_avrg - min(cap1_seg,[],2); cap_max = max(cap1_seg,[],2) - cap1_avrg; cap_std = std(cap1_seg,0, 2); % Store the Processed data in a 3-D Matrix Data(Count,:,1) = fre1_avrg; Data(Count,:,2) = volt1_avrg; Data(Count,:,3) = curr1_avrg; Data(Count,:,4) = phase1_avrg; Data(Count,:,5) = resis1_avrg; Data(Count,:,6) = cap1_avrg; Data(Count,:,7) = cndut1_avrg; Data(Count,:,8) = ratio_of_cndut_and_freq_avrg; Data(Count,:,9) = tandelta; Data(Count,:,10) = AxisMatrix; Data(Count,:,11) = Yimg; Data(Count,:,12) = Yreal; Data(Count,:,13) = Ymag; Data(Count,:,14) = -1 .* Zimg; Data(Count,:,15) = Zreal; Data(Count,:,16) = Zmag; Data(Count,:,17) = cap_std; Data(Count,:,18) = cap_min; Data(Count,:,19) = cap_max; end Capacitance = Data(:,5,6); m = 12.399*(10^12); k = -195.45; Moisture = Capacitance .* m + k; std_dev = std(Moisture,0, 1); Mean_cap = mean(Moisture, 1); [no_of_runs,temp] = size(Moisture); for n = 1:no_of_runs low(n,1) = Mean_cap - (std_dev/2); low(n,2) = n; end for n = 1:no_of_runs 134 high(n,1) = Mean_cap + (std_dev/2); high(n,2) = n; end for n = 1:no_of_runs mean(n,1) = Mean_cap; mean(n,2) = n; end for n = 1:no_of_runs delta(n,1) = Mean_cap - Moisture(n,1); mean(n,2) = n; end figure(1); subplot(2,1,1); bar(AxisIndex,Moisture,'kd-'); xlabel('Trial Number'); Ylabel('Moisture (%)'); hold on; plot(low(:,2),low(:,1),'k--'); plot(high(:,2),high(:,1),'k--'); plot(mean(:,2),mean(:,1),'k-'); hold off; Grid on; axis([1,no_of_runs,(Mean_cap - (std_dev*2)),(Mean_cap + (std_dev*2))]); subplot(2,1,2); bar(AxisIndex,delta,'k'); xlabel('Trial Number'); Ylabel('Deviation from Mean (%)'); hold on; plot(mean(:,2),(mean(:,1).*0),'k-'); plot(low(:,2),low(:,1)-mean(:,1),'k-'); plot(high(:,2),high(:,1)-mean(:,1),'k-'); hold off; axis([1,no_of_runs,(0 - (std_dev*2)),(0 + (std_dev*2))]); Grid on; Peak_to_Peak_Variation = max(delta) - min(delta); 135 11.LinearFitFunc.m function [figurenumber] = linearfitfunc(Data,XAxis,YAxis,figurenumber,labelX,labelY,Title) [no_of_files,no_of_freq,no_of_parameters] = size(Data); for Count = 1:no_of_freq [p_cap(Count,:),s_cap(Count,:)] = polyfit(Data(:,Count,YAxis),Data(:,Count,XAxis),1); Fitted_axis(Count,:) = polyval(p_cap(Count,:),Data(:,Count,YAxis))'; error = Fitted_axis(Count,:) - Data(:,Count,XAxis)'; abs_error = abs(error); percentage_error = abs_error * 100 ./ Data(:,Count,XAxis)' errormatrix(Count,1) = Count; errormatrix(Count,2) = mean(percentage_error); end errormatrix = sortrows(errormatrix,2); Count Text1 Text2 Text3 Text4 = = = = = errormatrix(1,1); strcat('Frequency = ',sprintf('%1.3e',Data(1,Count,1))); strcat('Error = ',sprintf('%1.3e',errormatrix(1,2))); strcat('m = ',sprintf('%1.3e',p_cap(Count,1))); strcat('k = ',sprintf('%1.3e',p_cap(Count,2))); for Counter = 1:1 Count = errormatrix(Counter,1); figurenumber = figurenumber + 1; figure(figurenumber); plot(Data(:,Count,XAxis), Fitted_axis(Count,:), 'ko'); hold on; plot(Data(:,Count,XAxis),Data(:,Count,XAxis), 'k:'); xlabel(labelX); ylabel(labelY); title(Title); grid on; space = ( max(Fitted_axis(Count,:)) - min(Fitted_axis(Count,:)) ) / 10; text((space+min(Fitted_axis(Count,:))),(1*space + min(Fitted_axis(Count,:))),Text1); text((space+min(Fitted_axis(Count,:))),(2*space + min(Fitted_axis(Count,:))),Text2); text((space+min(Fitted_axis(Count,:))),(3*space + min(Fitted_axis(Count,:))),Text3); text((space+min(Fitted_axis(Count,:))),(4*space + min(Fitted_axis(Count,:))),Text4); end 136 12.DataFittingFunc.m function [temp_matrix,error,figurenum] = datafittingfunc(Data,index,AxisIndex,figurenumber,labelX,labelY,Title,n o_of_plots) % Calculating all Possible Ratios of Conductances [no_of_files,no_of_freq,no_of_parameters] = size(Data); Count = 0; for freq1 = 1:(no_of_freq-1) for freq2 = (freq1+1):no_of_freq Count = Count + 1; ratio_of_conductance(Count,:) = (Data(:,freq1,index) ./ Data(:,freq2,index))'; freq_used(Count,1) = Data(1,freq1,1); freq_used(Count,2) = Data(1,freq2,1); end end % Linear Fitting the Ratio of Conductances [no_of_ratios,no_of_files] = size(ratio_of_conductance); for Count = 1:no_of_ratios temp1_matrix(:,1) = ratio_of_conductance(Count,:)'; temp1_matrix(:,2) = AxisIndex(:); temp1_matrix = sortrows(temp1_matrix); temp_matrix(Count,:,1) = temp1_matrix(:,1); temp_matrix(Count,:,2) = temp1_matrix(:,2); [p_cond(Count,:),s_cond(Count,:),mu] = polyfit(temp_matrix(Count,:,1)',temp_matrix(Count,:,2)',1); newyvalues = polyval(p_cond(Count,:),temp_matrix(Count,:,1)',[],mu); temp_matrix(Count,:,3) = newyvalues; end % Calculating the Normalized absolute error in curver fitting [no_of_ratios,no_of_files,no_of_parameters] = size(temp_matrix); for Count = 1:no_of_ratios local_min = min(temp_matrix(Count,:,1)); local_max = max(temp_matrix(Count,:,1)); local_range = local_max - local_min; local_error = ( temp_matrix(Count,:,2) - temp_matrix(Count,:,3) ).^2; local_error = local_error .* local_range; error(Count,1) = sum(local_error,2); error(Count,2) = Count; end error = sortrows(error); % Plotting The Top 5 ratios for counter = 1:no_of_plots 137 figurenum = figurenumber + counter - 1; figure(figurenum) Count = error(counter,2); hold on; freq1_string = num2str(freq_used(Count,1)); freq2_string = num2str(freq_used(Count,2)); plot(temp_matrix(Count,:,1),temp_matrix(Count,:,2),'bo' ); plot(temp_matrix(Count,:,1),temp_matrix(Count,:,3),'rp-' ); xlabel(labelX); ylabel(labelY); title_str = strcat(Title,' - ',freq1_string,'Hz / ',freq2_string,'Hz'); title(title_str); orient landscape; grid on; axis tight; hold off; end figurenum = figurenum + 1; 138 13.TwoVariableLinearFitFunc.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%% Least Square Fitting of Y = aX1 + bX2 + C %%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [error, constants] = TwoVariableLinearFitFunc(x2,x1,y) % Determining the Number of Elements [temp,n] = size(x1); % Computing Sums sumX1 = sum(x1); sumX2 = sum(x2); sumY = sum(y); sumX1sqr = sum(x1 .* x1); sumX2sqr = sum(x2 .* x2); sumX1X2 = sum(x1 .* x2); sumYX1 = sum(x1 .* y); sumYX2 = sum(x2 .* y); % Forming the Coefficient Matrix coeff(1,1) = sumX1X2; coeff(1,2) = sumX1sqr; coeff(1,3) = sumX1; coeff(2,1) = sumX2sqr; coeff(2,2) = sumX1X2; coeff(2,3) = sumX2; coeff(3,1) = sumX2; coeff(3,2) = sumX1; coeff(3,3) = n; % Forming the RHS RHS(1) = sumYX1; RHS(2) = sumYX2; RHS(3) = sumY; % Scaling the Matrix min_ele = min(coeff,[],2); coeff(1,:) = coeff(1,:) ./ min_ele(1); coeff(2,:) = coeff(2,:) ./ min_ele(2); coeff(3,:) = coeff(3,:) ./ min_ele(3); RHS(1) = RHS(1) ./ min_ele(1); RHS(2) = RHS(2) ./ min_ele(2); RHS(3) = RHS(3) ./ min_ele(3); % Testing the condition of Coeffecient Matrix 139 error = 0; if (coeff == coeff') % Checking for Singular Matrix error = 1; elseif (cond(coeff) > 1e15) error = 1; end % Computing the Inverse of Coeff Matrix coeff_inverse = inv(coeff); % Solving for Constants constants = coeff_inverse * RHS'; 140 14.TwoVariableLinearEvalFunc.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%% Least Square Fitting of Y = aX1 + bX2 + C %%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [y] = TwoVariableLinearEvalFunc(constants,x1,x2) y = (constants(1) .* x1) + (constants(2) .* x2) + constants(3); 141 15.ParameterEstimation.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%% %%%%%%% %%%%%%% %%%%%%% %%%%%%% This program tries to evaluate the most useful %%%%%%% %%%%%%% parameters. It uses the all_comb_func to generate all %%%%%%% %%%%%%% possible combination of parameters and ranks them %%%%%%% %%%%%%% according to the normalized errors of the fits. %%%%%%% %%%%%%% This is done of each of the data sets. %%%%%%% %%%%%%% The parameter fit that best fits all the data %%%%%%% %%%%%%% sets is then chosen %%%%%%% %%%%%%% %%%%%%% %%%%%%% %%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% clear all; close all; % Set font size. set(0, 'DefaultAxesFontSize',20) set(0, 'DefaultTextFontSize',20) start = 5; stop = 25; % <-- the starting index. for select = 1:2 % Initializing file names. if select == 2 directname = 'C:\Data\10-24-02\' filename(1,:) = '10'; filename(2,:) = '09'; filename(3,:) = '08'; filename(4,:) = '07'; filename(5,:) = '06'; filename(6,:) = '05'; filename(7,:) = '04'; filename(8,:) = '03'; AxisIndex = [10,9,8,7,6,5,4,3]; elseif select == 1 directname = 'C:\Data\04-07-03\pulp\' filename(1,:) = '10'; filename(2,:) = '09'; filename(3,:) = '08'; filename(4,:) = '07'; AxisIndex = [10,09,08,07]; 142 end [a,Data,Parameter_matrix] = all_comb_func(directname,filename,AxisIndex,start,stop,select); sortederrormatrix(select,:,:) = a; end [no_of_datasets,no_of_parameters,temp] = size(sortederrormatrix); for n = 1:no_of_parameters rankmatrix(n,1) = n; rankmatrix(n,2) = 0; rankmatrix(n,3) = 0; rankmatrix(n,4) = 0; for m = 1:no_of_datasets rankmatrix(n,2) = rankmatrix(n,2) + sortederrormatrix(m,n,6); rankmatrix(n,3) = rankmatrix(n,3) + sortederrormatrix(m,n,1); end end sortedrankmatrix = sortrows(rankmatrix,2); % for n = 1:no_of_parameters % rankmatrix(n,4) = rankmatrix(n,4) + n; % end % % sortedrankmatrix = sortrows(rankmatrix,3); % for n = 1:no_of_parameters % rankmatrix(n,4) = rankmatrix(n,4) + n; % end % sortedrankmatrix = sortrows(rankmatrix,4); % Plotting the best fits figurenumber = 1; for counter = 1:15 parameter = sortedrankmatrix(counter,1); figurenumber = linearfitfunc(Data,10,parameter,figurenumber,'Actual Fiber Content(%)','Estimated Fiber Content(%)',parameter); end 143 16.all_comb_func.m %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%% %%%%%%% %%%%%%% %%%%%%% %%%%%%% This Function generates all possible combination %%%%%%% %%%%%%% of parameters and does linear fit on them. It then %%%%%%% %%%%%%% evaluates the normalized error for each of the fits %%%%%%% %%%%%%% and ranks the parameters according to the errors. %%%%%%% %%%%%%% The function requires an array containing the %%%%%%% %%%%%%% filenames, a string with the path and an Axis index %%%%%%% %%%%%%% detailing the actual Y Values for the Fit. The %%%%%%% %%%%%%% function returns an array with all the details of the %%%%%%% %%%%%%% parameters and their ranks. %%%%%%% %%%%%%% %%%%%%% %%%%%%% %%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% function [sortederrormatrix,Data,parameter_matrix] = all_comb_func(directname,filename,AxisIndex,start,stop,select) % "Time (days)" "Frequency" "Voltage" "Current" "Phase" "Resistance" "Capacitance" time_ind = 1; fre_ind = 2; volt_ind = 3; curr_ind = 4; phase_ind = 5; resis_ind = 6; cap_ind = 7; % Pre-Processing Each File [no_of_files, temp] = size(filename); for Count = 1:no_of_files tempdata = load([directname filename(Count,:) '.txt']); fre1 = tempdata(:, fre_ind); volt1 = tempdata(:, volt_ind); curr1 = tempdata(:, curr_ind); phase1 = tempdata(:, phase_ind); resis1 = tempdata(:, resis_ind); cap1 = tempdata(:, cap_ind); % Segment into Individual Sweeps fre1_seg = buffer(fre1, 25); volt1_seg = buffer(volt1, 25); 144 curr1_seg = buffer(curr1, 25); phase1_seg = buffer(phase1, 25); resis1_seg = buffer(resis1, 25); cap1_seg = buffer(cap1, 25); % Remove the low frequency data fre1_seg = fre1_seg(start:stop, :); volt1_seg = volt1_seg(start:stop,:); curr1_seg = curr1_seg(start:stop, :); phase1_seg = phase1_seg(start:stop, :); resis1_seg = resis1_seg(start:stop, :); cap1_seg = cap1_seg(start:stop, :); % Averaging the data across Sweeps fre1_avrg = mean(fre1_seg, 2); volt1_avrg = mean(volt1_seg, 2); curr1_avrg = mean(curr1_seg, 2); phase1_avrg = mean(phase1_seg, 2); resis1_avrg = mean(resis1_seg, 2); cap1_avrg = mean(cap1_seg, 2); % Obtain Conductance from Resistance cndut1_avrg = 1./resis1_avrg; % Calculating ratio of Conductance and Angular Frequency ratio_of_cndut_and_freq_avrg = cndut1_avrg./(2*pi*fre1_avrg); % Calculating tandelta tandelta = 1./ ((2*pi*fre1_avrg) .* (cap1_avrg) .* (resis1_avrg)); % Creating AxisMatrix [rows,cols] = size(cap1_avrg); for n = 1:rows for m = 1:cols AxisMatrix(n,m) = AxisIndex(Count); end end % Calculating Admittance Yreal = cndut1_avrg; w = 2*pi*fre1_avrg; Yimg = w .* cap1_avrg; Y = complex(Yreal,Yimg); Ymag = abs(Y); % Calculating Admittance Z = 1 ./ Y; Zimg = imag(Z); Zreal = real(Z); Zmag = abs(Z); % Store the Processed data in a 3-D Matrix 145 Data(Count,:,1) = fre1_avrg; Data(Count,:,2) = volt1_avrg; Data(Count,:,3) = curr1_avrg; Data(Count,:,4) = phase1_avrg; Data(Count,:,5) = resis1_avrg; Data(Count,:,6) = cap1_avrg; Data(Count,:,7) = cndut1_avrg; Data(Count,:,8) = ratio_of_cndut_and_freq_avrg; Data(Count,:,9) = tandelta; Data(Count,:,10) = AxisMatrix; Data(Count,:,11) = Yimg; Data(Count,:,12) = Yreal; Data(Count,:,13) = Ymag; Data(Count,:,14) = Zimg; Data(Count,:,15) = Zreal; Data(Count,:,16) = Zmag; end [no_of_files,no_of_freq,no_of_parameters] = size(Data); New_Parameter = no_of_parameters; % The parameter_matrix has 6 cols. parameter number, parameter1, % parameter2, frequency1, subtract, and divide. counter = 0; for counter = 1:no_of_parameters parameter_matrix(1,counter) = counter; parameter_matrix(2,counter) = counter; parameter_matrix(3,counter) = 0; parameter_matrix(4,counter) = 0; parameter_matrix(5,counter) = 0; parameter_matrix(6,counter) = 0; end origparameters = no_of_parameters + 1; % Difference of all Parameters for parameter1 = 1:no_of_parameters if parameter1 ~= 10 % Avoiding the Index for parameter2 = 1:no_of_parameters if parameter1 ~= parameter2 % Avoiding all Zeros if parameter2 ~= 10 New_Parameter = New_Parameter + 1 counter = counter + 1; parameter_matrix(1,counter) = New_Parameter; parameter_matrix(2,counter) = parameter1; parameter_matrix(3,counter) = parameter2; parameter_matrix(4,counter) = 0; parameter_matrix(5,counter) = 1; parameter_matrix(6,counter) = 0; Data(:,:,New_Parameter) = Data(:,:,parameter1) Data(:,:,parameter2); end end end 146 end end % Ratio of all Parameters for parameter1 = 1:no_of_parameters if parameter1 ~= 10 for parameter2 = 1:no_of_parameters if parameter1 ~= parameter2 if parameter2 ~= 10 New_Parameter = New_Parameter + 1 counter = counter + 1; parameter_matrix(1,counter) = New_Parameter; parameter_matrix(2,counter) = parameter1; parameter_matrix(3,counter) = parameter2; parameter_matrix(4,counter) = 0; parameter_matrix(5,counter) = 0; parameter_matrix(6,counter) = 1; Data(:,:,New_Parameter) = Data(:,:,parameter1) ./ Data(:,:,parameter2); end end end end end parameters_after_P = New_Parameter + 1; % Difference of all Frequency for freq1 = 1:no_of_freq for parameter = 2:no_of_parameters if parameter ~= 10 New_Parameter = New_Parameter + 1 counter = counter + 1; parameter_matrix(1,counter) = New_Parameter; parameter_matrix(2,counter) = parameter; parameter_matrix(3,counter) = 0; parameter_matrix(4,counter) = freq1; parameter_matrix(5,counter) = 1; parameter_matrix(6,counter) = 0; for freq2 = 1:no_of_freq % for files = 1:no_of_files Data(:,freq2,New_Parameter) = Data(:,freq1,parameter) - Data(:,freq2,parameter); % end end end end end % Ratio of all Frequency for freq1 = 1:no_of_freq 147 for parameter = 2:no_of_parameters if parameter ~= 10 New_Parameter = New_Parameter + 1 counter = counter + 1; parameter_matrix(1,counter) = New_Parameter; parameter_matrix(2,counter) = parameter; parameter_matrix(3,counter) = 0; parameter_matrix(4,counter) = freq1; parameter_matrix(5,counter) = 0; parameter_matrix(6,counter) = 1; for freq2 = 1:no_of_freq % for files = 1:no_of_files Data(:,freq2,New_Parameter) = Data(:,freq1,parameter) ./ Data(:,freq2,parameter); % end end end end end parameters_after_F = New_Parameter; Text1 = strcat('Select',sprintf('%d',select),'level1'); save(Text1); % Fitting the data [no_of_files,no_of_freq,no_of_parameters] = size(Data); Count = 0; for parameter = 2:no_of_parameters if parameter ~= 10 Count = Count + 1; [errormatrix(Count,1),errormatrix(Count,2),errormatrix(Count,3),errorma trix(Count,4)] = linearfitfuncwitherror(Data,10,parameter); errormatrix(Count,5) = parameter; end end % sorting the fits to determine the best fits sortederrormatrix = sortrows(errormatrix,1); [no_of_parameters,temp] = size(sortederrormatrix); for count = 1:no_of_parameters sortederrormatrix(count,6) = count; % Assigning ranks by error end sortederrormatrix = sortrows(sortederrormatrix,5); % Rearrange by parameter
© Copyright 2026 Paperzz