text:
# PhD thesis

Posted on 2018, June, 28 in science • 20 min read

In this note the short content of my PhD work (candidate dissertation) are given (PhD of technical science; specialty 01.04.01 devises and methods of experimental physics).

 Graphical Abstract

## Software and hardware for combine X-ray fluorescence and optical system for analysis of complex phosphorus-containing mineral fertilizers

The presented work was carried out in the JSC "The Research Institute for Fertilizers and Insecto-fungicides named after Professor Y.V.Samoilov" (JSC "NIUIF").

 Scientific adviser: Sokolov Valery Vasilievich, PhD of technical science, Head of Quality and Standardization Department of JSC "NIUIF" Official opponents: Eremenko Yuri Ivanovich, Doctor of Technical Sciences, Professor, Head of the Department of Automated and Information Control System of the Starooskolsky Technological Institute named after A.A.Ugarov (branch) of the federal state autonomous education institution "National Research Technological University MISiS" Bagaev Kirill Alexandrovich, PhD of physical and mathematical sciences, technical director of JSC "Newcom-NDT" Lead organization St. Petersburg State Technological Institute (Technical University), Department of Automation of Chemical Processes

Defense of the PhD thesis took place on December 22, 2017 at 4:00 pm in the conference hall at the meeting of the dissertation council D002.034.01 at the Institute of Analytical Instrumentation at the address: 198095, St.Petersburg, Ivan Chernykh street, 31-33, lit. A. The thesis can be found in the library and on the site of the Insitute of Analytical Instrumentation.

## General description of the work

The relevance of the work. Modern industrial production of mineral fertilizers is a complex and multi-factorial process in which three key objects are presented: incoming raw materials, intermediate objects (phosphoric acid, sulfuric acid, ammonia, etc.) and products. Practice shows, that without complex accounting of production parameters it is impossible to achieve reproducible and height-quality industrially produced products. For this purpose, the X-ray fluorescence analysis (XRF), which is one of the most informative methods of analytical control, is very suitable.

At the same time, this method is seldom used in the quality control of industrial produced mineral fertilizers (despite the significant development of mathematical approaches and instrumental park in last 20 years). One of the possible reasons is complexity of industrial objects. Such products have a lot of elements in base substance, which greatly increases the error of the direct XRF analysis.

However, the modern computer technology and analytical methods allows to solved these problems. They allows to accumulate and process a great amount of information in order to obtain a more detailed, accurate and reproducible research of the continuous industrial processes.

Objects of the research. The complex phosphorus-containing mineral fertilizers and their quality parameters (particles size, preliminary condition of drying, chemical composition etc.).

Purpose of the work. To create software and hardware for complex quality control device, which is based on an energy-dispersion (ED) X-ray fluorescence spectrometer and optical system. Developed device increase the efficiency, speed and reliability of quality control of industrially produced mineral fertilizers. It is necessary to solve the following tasks to achieve such goal:

1. To identify meaningful chemical and physical parameters for effective X-ray and optical research of complex fertilizers matrix.
2. To develop a hardware system for obtaining physical and chemical information.
3. To develop an automatic algorithm for the allocation and calculation of informative features of quality of industrial produced mineral fertilizers.
4. To create a prototype of a single analytical database for using big data analysis (BDA) and machine learning methods.
5. To justify and develop a scheme for the complex analysis of mineral fertilizers for created device (which will minimize losses of raw materials and energy resources when facility switch from one industrially produced brand to another).
6. To ensure, that the developed method can be used in industrial laboratories (provide simple and stable software and hardware).

Scientific novelty.

1. The new software and hardware scheme of combine ED X-ray fluorescence spectrometer with optical surface recognition system was developed for a multi-factor express analysis of mineral fertilizers (with experimental approval).
2. Techniques for determining physical and chemical parameters of mineral fertilizers were developed (concentration of various chemical elements, type, brand, fraction composition and value of conditioning additives (CA)).
3. Based on the experimental results, an original analytical database of physical and chemical properties was created, which makes it possible to increase the accuracy and speed of measurements.
4. The schemes of regression and classification analysis, which is based on fertilizers brand (nutrients (N, P, K) and sulfur) and physical properties was developed.
5. On the basis of ED XRF and the compiled database, the technique for determining nitrogen in mineral fertilizers was proposed (direct detection of which by the ED XRF method is impossible).
6. The developed software for the device, which provides automatic calculation and big data analysis for mineral fertilizers was created and registered.
7. A technique for determining the fraction of pressed samples for ED XRF with an optical surface recognition was developed.

Practical significance.

The developed techniques and device are used in the "PosAgro" corporation mineral fertilizers facilities. The developed algorithms for data processing are used in the some ED XRF spectrometers, which is produced by JSC "Scientific Instruments".

1. To implement presented techniques, a software and hardware complex was developed which allowed to increase the sensitivity, accuracy and speed of mineral fertilizers quality control.
2. A new prototype of devise with ED XRF and optical recognition was created and tested for analysis of the chemical composition (all nutrients and sulfur) and particle size of objects. The proposed equipment have broad prospective both in the laboratory and in the industrial automated control.
3. An original techniques for control of granules size and conditioning quality were implemented.
4. A scheme of the multi-factors control was developed for minimize losses of raw materials and energy resources when industrial production switch from one fertilizers brand to another.

Main theses.

• Software and hardware for device, which is based on the ED XRF spectrometer and optical system (for surface recognition and multi-factor express analysis of mineral fertilizers).
• Algorithms for features preparations for database of physical and chemical properties of industrial produced mineral fertilizers (concentration of various chemical elements, type, brand, fraction composition and presence of CA).
• The original mathematical model of the rapid and complex analysis of the investigating objects, which is used for determine:
• physical properties (brand, maximum size of particles, preliminary condition of drying and presence of conditioning additive);
• chemical properties (concentration of nutrient and sulfur, type and brand, including concentration of nitrogen, which is not determined directly by the ED XRF).
• Algorithms and software ("DSpectra"), which provide automated calculation of analytical signals, features for big data analysis, regression and correlation models.

In accordance with the passport of specialization (01.04.01 - "Devices and methods of experimental physics") the presented work describe the development of technique for significantly increasing the accuracy, sensitivity and speed of measurements of physical properties. It is used for quality control of industrially produced mineral fertilizers. Moreover, the automated physical experiment was implemented. A small sized and efficient device for obtaining complex physical and chemical information was developed as well.

Publication. Eight article were published, including two in the journals, which are recommended by the Higher Attestation Commission of the Russian Federation. Four reports at Russian and international conferences and seminars and one certificate of software registration were published as well. A list of works is given at the end of this note.

The structure and volume of the work. Current research (in Russ.) is presented at 187 pages and consist of an introduction, six chapters, conclusion, appendix and list of references with 116 titles. The work contains 50 tables and 65 figures.

## The summary of the work

Introduction (the first chapter) is devoted to the dissertation aim. The aim, tasks and relevance are formulated. The scientific novelty, practical significance and main theses are determined.

The second chapter gives an overview of Russian and foreign literature, which is related to the topic of the work. The characteristics of modern industrial production of complex phosphorus-containing mineral fertilizers were given. The main products, which determine the quality of all technology were highlighted (ore (apatite), extraction phosphoric acid (EPhA) and various types and brands of fertilizers). The type of fertilizer represent the macro- and micro-components composition (MAF - mono-ammonium phosphate (NP), NPK, NPK(S), NP(S+S)+Zn, which contains the elemental sulfur and zinc as additions). In the other hand, the mark of fertilizers represents the quantitative content of components, which is mentioned in type (12-52, 15-15-15, 4-30-15 (16), 12-40(6+3)+1 respectively). The brand represents both type and mark of fertilizers. Furthermore, the main object of the research was described (the phosphorus-containing mineral fertilizers). The physical and chemical parameters of the fertilizers base were examined and the quality markers were identified. The various techniques for process and obtain of analytical information were investigated. Moreover, the different methods of analytical control in industrial and environmental practice were reviewed, and their properties and applicability were estimated. It was established, that the XRF-analysis is the most informative and express methods of quality control (Figure 1). As the result, the software and hardware properties of express and informative analysis for industrially produced mineral fertilizers were identified. The tasks were set.

 Fig. 1. Number of articles devoted to one or another analytical method, normalized to the average number of articles per year. The figure consists of articles, which were published over the past 10 years (based on the Scopus search results). The "XRF" is the combination of energy disperse and wave technique; "ICP" - various types of spectroscopy with inductively coupled plasma; "Spectroscopy" - methods of spectroscopy without ICP; "classical" - titration and gravimetry.

The third chapter is devoted to the theoretical basis of multi-factor control of fertilizers. Methods of classification, regression and clusterization were examined. Mathematical and statistical approaches to accumulation and processing of objects features are considered. All mathematical algorithms for this work are presented. Necessity of noise reduction is established (for achieve the completeness and quality of analysis of industrially produced objects). Various algorithms of the data transformations was carried out for such purpose:

• normalization, balancing and coding of data;
• smoothing and calculation of anomalies in images from the optical system;
• smoothing the XRF spectrum with different filters (middle and median filters, Savitsky-Golay, Fourier transform with cutting of noise frequencies);
• use of various automated algorithms for identifying and calculating the intensities of characteristic lines (differentiation and "zero filter").

Furthermore, the required features for building a database "objects-features" for statistical analysis are given (Table 1).

Table 1. Main features of objects and its types.

Features Type of values
intensity of chemical elements in the spectrum numeric
maximum size of particles (fraction) categorical*
preliminary condition of drying binary
number of artifacts in "surface map" numeric
area of artifacts in "surface map" numeric
fertilizer type categorical*
fertilizer mark numeric

* features, which belong to certain category and can't be compare to each other (also known as nominal)

To identify the missing binary and categorical data various classification models were describe (logistic regression, regression with regularization, random forest and naive Bayes). Moreover, classification was used to monitor the proximity of products quality to required ones. Such information are especially relevant when facility switch production from one fertilizer brand to another. Accurate and reproducible classification allows resources and energy saving in such processes.

Variants regression algorithms were considered after the classification (for determining the chemical properties of fertilizers). Regression coefficients use different regularization type:

• L1 (Ridge): $$w=argmin_w(\frac{1}{l}\sum_{i=1}^l (\langle w, x_i \rangle − y_i)^2 + \lambda \sum_{i=1}^d w_j^2)$$;

• L2 (Lasso): $$w=argmin_w(\frac{1}{l}\sum_{i=1}^l (\langle w, x_i \rangle − y_i)^2 + \lambda \sum_{i=1}^d |w_j|$$;

while the coefficients without regularization are:

• $$w=argmin_w(\frac{1}{l}\sum_{i=1}^l (\langle w, x_i \rangle − y_i)^2)$$.

where $$w$$ is the coefficient in front of the feature, $$x_i$$ - the i feature, $$\langle w, x_i \rangle$$ - the scalar product of the vector (coefficients and features), $$y_i$$ - the response, $$l$$ - parameters quantity, $$d$$ and $$\lambda$$ - optimization parameters.

Finally, the several techniques for big data analysis were justified for further using as a result of this chapter. They quality metrics are describe (precision, recall and F-metrics for classification and standard deviation (STD), Pearson's coefficient of correlation and Spearman's coefficient of correlation for regression). The "grid search" method for optimal parameters detection was described for each of the presented algorithms. In addition, various techniques for data dimension reduce and visualize were presented.

The schemes of experiments are describe in the fourth chapter. The list of developed device and equipment include diagrams and detailed instructions. The other list is the used resources (instruments, reagents and working samples).

The scheme of a multi-factorial experiment for controlling the fertilizers quality when production switch from NP(S) 12-40(10) to the NP(S+S)+Zn 12-40(6+3)+1 is given. The main procedures of sample preparation for classification and regression analysis are described. Table of used samples are compiled (7 types of objects, about 170 samples in 3 parallel measurements). The algorithm for optimal parameters determination for X-ray device with optical system is describe.

The general sample preparation procedure includes select of a representative sample from the mass of the product and it preparation for analysis. The crumbled (with various particle size) samples are pressed into pellets with 20 mm diameters as a "sandwich structure" on a boric acid substrate. Next, with developed hardware and software the general algorithm for measuring properties of mineral fertilizer was proposed.

The main chapter result is the total experimental plan for collect and analyze data.

The fifth chapter include tuning the developed device and its working algorithm (XRF and optical analysis). Moreover, the chapter describe creation of single database of studied samples. The optical procedure of samples' physical parameters estimation is performed (including conditioning additives, which are the most expensive raw material for mineral fertilizers). It's working parameters were tuned up and selected.

A photograph of the sample's surface (in normal and UV light) was used to obtain the optical features. The resolution of photo is at least 640 × 480 pixels. Next, surface area with at least 100 × 100 pixels was allocated from photo. Finally, from the selected area the "surface map" was constructed (Figure 2). The "surface map" is the intensity (brightness) of each pixel in range [0; 250], which calculated as follow:

$$I = \frac {I_R + I_G + I_B}{3}$$

where $$I_R$$, $$I_G$$, $$I_B$$ are the intensity of red, green and blue pixels respectively.

(a) (b) (c)
Fig. 2. An example of the photo processing. The width and length of the image are number of pixels. (a) - pressed granules, (b) - pressed powder with grains < 500 μm, (c) - pressed powder with grains < 100 μm. The first row is an unprocessed "surface map", the second row is a differentiated image, the third row is a differentiated and smoothed image that forms a final "surface map".

The area of total "artifacts" pixels (which is difference from 0) is calculated from the smoothed "surface map". It has been established, that this parameter is in good agreement with containing CA (as binary feature, in case of UV illumination) and type of particle size (as categorical feature for granules, 500 μm and 100 μm powders, in case of visible light illumination). Moreover, the classification algorithm parameters were carried out (Figure 3). Thus, the optimal parameters of classification were distinguished (median filter window is 10 pixels and constant of contour search is 0.5), which were based on the "surface map".

 Fig. 3. Surface of correlation coefficient values (between find artifacts on "surface map" and size of pressed grains as numeric features 100, 500 and 5000 μm). On XYZ axes are smoothing window, contour constant value and Spearman correlation coefficient (the strength of the monotonic relationship) respectively.

Furthermore, the tuning of XRF analysis parameters was carried out. Main aims are reduce the noise level and automate features selection for spectra. For each type of mineral fertilizer several quality metrics were estimated under various operating conditions (smoothing force, STD of signals in the spectrum, the magnitude of the characteristic lines shift and the number of automatically detected lines). As the result, the following stages of algorithm are justified (Figure 4).

1. Smooth with Savitsky-Golya filter (fast and did not change the shape and position of characteristic lines) with 10 units window width and 4th degree of equation.
2. Automatic search of characteristic lines and selection of the background component by the "zero filter" algorithm with a window width (v) of 10 units and a width of the shift (w) of 10 units, which is the most flexible and accurate.
 Fig. 4. Example of the proposed algorithm's results.

On the basis of found optimal parameters the clear and significant information for the developed X-ray and optical combined devise was identified. Preprocess of selected features were carried out (balancing, normalization and coding). The single database "objects-features" was compiled as the result.

The sixth chapter is devoted to work with the obtained database and to transform selected features into useful analytical information. The various machine learning models of classification, regression and clusterization was studied to calculate the parameters of mineral fertilizers quality (based on quality metrics, which was selected in chapter 3).

Five classification algorithms were examined (regression, regression with regularization (L1 and L2), random forest and naive Bayes). The described algorithms are used to determine not numeric features (the brand of sample, the type of particles size and the pre-drying condition). Fist, the quality of the proposed algorithms were compared for each part of the developed devise separate (optical and ED XRF). Next, the use of combined device was justified. The F-metric (harmonic mean of precision and recall) characteristic for described machine learning classifications algorithms is shown on Table 2. The Random Forest algorithm is the best.

$$F = \frac{2 \times precision \times recall}{precision + recall}$$

Table 2. F-metric (%) quality of work of classifiers.

 Classifier N mark P mark K mark S mark Fraction Pre-drying condition Regression 99.31 99.78 99.59 99.56 92.40 72.94 Regression with L1 regularization 99.65 99.78 99.57 98.87 92.51 73.08 Regression with L2 regularization 99.65 99.78 100.0 98.99 91.33 68.46 Random Forest 100.0 100.0 100.0 98.99 98.40 73.37 Naive Bayes 71.12 60.71 66.84 73.72 53.32 73.04

Similarly, optimal parameters for the regression algorithms were searched as well (for determining the chemical composition of the fertilizers). The STD and coefficient of determination were chosen as quality metrics (Table 3).

All the missing physical parameters (categorical) in the original matrix were filled with selected classification approach. Further, the regression model was constructed to calculate the concentration of the main nutrient elements in fertilizers. As the result, the possibility of indirect determination of the nitrogen content were shown.

Table 3. $$R^2$$ (%) quality of regression algorithms

 N % P % K % S % Range of concentration, mas. % [0; 16]  [15; 52]  [0; 20]  [0; 20]  Linear regression 98.78 98.00 99.61 98.17 Linear regression with L1 regularization 97.04 97.10 99.26 95.79 Linear regression with L2 regularization 98.78 97.70 99.61 98.17

Thus, the proposed classification and regression algorithms works with sufficient accuracy (more than 98% for the selected quality metrics in general). They provide a quick estimate of the quality of industrially produced mineral fertilizers and work in automate mode.

A procedure for clustering data for their visual representation was also performed. Algorithms for linear and nonlinear reduction of the dimensions are used to construct a "type map". It is two-dimensional representation of the whole fertilizers properties. It is shown, that the use of a linear principal component analysis (PCA) gives the best results (Figure 5).

 Fig. 5. Two components projection analysis (PCA) of fertilizers properties. Green stars indicates centers of clusters (calculated by the k-means algorithm).

Methods for calculating the necessary analytical information with database "objects-features" and machine learning techniques are the results of sixth chapter. The Random Forest is the best algorithm for classification (according to F-measure). Linear regression with L2 regularization is the best algorithm for determine numerical properties. And the linear PCA with 2 components is sufficient for represent the whole researched properties of fertilizers. In addition, a scheme for calculating the distance between classes of objects in PCA is proposed for fast determine they similarity.

The seventh chapter describes the software algorithm of the developed device as well as shows various industrial tests (inside "PhosAgro" corporation facilities). It is consider several approaches:

• calculate physical and chemical properties of mineral fertilizers;
• optimizing sample preparation conditions;
• control products, when production switch to new types or brands of fertilizers;
• calculate some additional quality parameters for fertilizers (granulometric composition and sphericity).

The structure of the software, based on previously chosen algorithms (Chapter 6) is shown in Figure 6. An additional feature of the software is the ability to monitor the quality of the lab technician's work. Monitoring is performed on the basis of the maximum allowed fraction (calculated with Chapter 6 classification algorithm).

 Fig. 6. Structure of "DSpectra" software

With the developed software and classification approach some of the optimizing sample preparation tasks is solved. In other hand, statistical parameters were evaluated for different stage of samples preparation for possibility of its elimination (Table 4).

Table 4. Stages of sample preparation, which optimization is needed.

 Type of sample preparation Crushing to < 500 μm Crushing to < 100 μm Is dryed Spend time * 1** - - - - 2 + - - 15 3 + + - 40 4 + - + 30 5 + + + 45

* approximate preparation time for 20 g product

** pressed granules of fertilizer

It was established, that preliminary drying of objects as well as their crushing to 100 microns insignificantly affect to the result of the XRF-optical combined devise (because of to multi-factorial algorithms). To ensure, we studied differences in characteristic lines of most inhomogeneous fertilizer NPK(S) 4-30-15(16).

According to obtained results, there are some differences in standard deviation between dried and not dried objects, which is not affect the average value and statistically insignificant. According to t-test we can eliminate this stage of sample preparation.

On the other hand, there is an abnormal decrease in variability for the 500 μm fraction, compare to 100 μm fraction. Such result indicate improvement in the quality of XRF analysis for the 500 μm fraction (abnormal effect)! We explain this effect by instability of some fertilizers powders in air condition. Such instability is greater for 100 μm tablets (faster moisturing and surface swelling). Based on the obtained data the fast sample preparation procedure is proposed (grinding up to 500 μm without preliminary drying). This method allow to reduce the analysis time from 45 to 10 minutes and preserve accuracy of used machine learning algorithms.

Next step is results of an industrial tests to monitor the quality of product for production switch from fertilizer NP(S) 12-40(10) to NP(S+S)+Zn 12-40(6+3)+1 (with elemental sulfur, Balakovo facility of JSC "Apatite"). The transition process took three days, sampling was carried out every 60 minutes. The developed combined device gave out information in 10 minutes after sampling (the classical chemical analysis of N, P and $$SO_4$$ + S took about 4 hours). To visualize the process we use automatic clustering into two main components (Figure 8).

 Fig. 8. An automatic PCA of transition process for developed combined device. 0 - final product, 1 - initial product, 2 - significant emissions, problems in technology, 3 - the transition process.

Finally, some "non-trivial" quality analysis with developed device are described. Various brands of mineral fertilizers were studied for particle size, form factor, degree of treatment with CA and conductivity of dilute solutions (salt index).

We shown, that developed combined devise can use each of type of analysis in separate ways. The optical block can determine granules size, shape and color. The accuracy of particle size calculation was compare with the most common alternative methods (Table 5). The proposed device well agree with the "woven" sieves (sieve with square cells, European standards). But each of methods is deviate from each other.

Table 5. Data comparison for different particle size determination methods (for MAP (NP) 12-52, Balakovo facilities of JSC "Apatite").

 Fraction, mm Camsizer, % Sieve with round cell, % Sieve with square cells, % Developed, % delta "Camsizer-Developed", % delta "Round cells-Developed", % delta "Square cells-Developed", % 0-1 0.00 0.02 0.03 0.00 0.00 0.02 0.03 1-2 0.27 0.09 0.16 0.00 0.27 0.09 0.16 2-3 20.57 11.05 40.29 27.35 6.78 16.30 12.94 3-4 75.13 81.14 56.12 56.50 18.63 24.64 0.38 4-5 3.93 7.52 3.35 15.31 11.38 7.79 11.96 \>5 0.10 0.19 0.05 0.84 0.74 0.65 0.79

In addition, we can build the "quality maps" of the granulated industrially produced fertilizers with developed technique (characterize the fertilizers by its particles size and particles shape). Examples of such maps are shown in Figure 9. Industrially produced MAP (NP 12-52) is better then NPK 9-25-25 (more spherical for each granules size).

 Fig. 9. "Quality maps" of granulated industrially produced fertilizers (particles sphericity VS size), a) - MAP (NP 12-52), which produced by the Balakovo facilitie of JSC "Apatit" (Balacovo city, Russia), b) - NPK 9-25-25, which produced by the JSC "Apatit" (Cherepovets city, Russia). The green area is theoretical area of quality products.

Next part is calculation of amount of conditioning additive on the granules (with using UV light for optical part of combined device, Figure 10). The amount of CA (which is directly proportional to fluorescing area) depends not only of the quantity of the CA, but also of type of fertilizer and method of applying the CA. Using this fact and numeric representation of area of fluorescing contours on image, we can improve laboratory control of industrial process of conditioning of fertilizers.

 Fig. 10. The specific area of fluorescing area (contours) on the surface map VS the amount of CA.

The "Salt Index" is another parameter of mineral fertilizers quality (sometimes it is approximated as the value of the conductivity of 0.1% fertilizer solution in distill water). Salt index depends of the chemical composition of fertilizers. We propose XRF method to determine it (base on the spectral lines of elements with multiple-factors regression, Figure 11). The correlation coefficient between the spectra features and the conductivity of dilute solutions is 95.9\%.

 Fig. 11. Regression line conductivity of dilute solutions of mineral fertilizers VS XRF features.

Results of the work are presented in scientific literature: [1] (analysis of complex phosphorus-containing fertilizers), [2] (analysis of apatite concentrate with machine learning algorithms), [3] (software registration certificate), [4] - [9] (construction of regression models and a mathematical features for XRF spectra).

Results and conclusions

The main results are listed below.

1. Significant chemical and physical parameters for the complex matrix of mineral fertilizers are highlighted (anomalies on the surface map (optical recorder), intensity of lines of chemical elements, background area and intensity of coherent and incoherent scattering of X-ray fluorescent analysis).

2. Possibility of nitrogen content determination in complex phosphorus-containing fertilizers by indirect features was proved.

3. An express and low cost device for combine analysis mineral fertilizers was developed (optical system and XRF analysis). Sample preparation for it was optimized.

4. The automatic algorithm of selection and calculation of informative features at quality control of industrially production was developed.

5. The prototype of unified database of "object-features" of mineral fertilizer for machine learning algorithms was created.

6. The possibility of solving a wider range of tasks with the use of the developed software and hardware device was proved (compare to classical XRF).

7. Possibility of calculation of other significant features of mineral fertilizers quality was shown ("quality maps", presence of pre-drying, salt index, etc.).

8. The software, which provides convenient and simple implementation of all developed algorithms was created and applied in production practice.

## Publications

1. Yunovidov D.V., Sokolov V.V., Bakhvalov A.S. The Use of the Sample Spectrum for Assessing the Impact of Different Stages of the NPKS Fertilizer Preparation on the Results of X-Ray Fluorescence Analysis // Industrial laboratory. Diagnostics of materials, 83 (9), 15-21 (2017). (In Russ.)
2. Yunovidov D.V., Sokolov V.V., Bakhvalova E.V, Donskikh V.A. Development of a standard sample of apatite concentrate. Effective control of homogeneity by XRF analysis methods, GIAB, 7, 131-144 (2016). (In Russ.)
3. Certificate No. 2017617704 Russian Federation. Program "DSpectra" / Yunovidov D.V.; applicant and rights holder Yunovidov D.V. - No 2017614722; declared 19.05.2017; registered in the Register of computer programs 11.07.2017 - [1] p.

Other articles and conference materials.

4. Yunovidov D.V., Sokolov V.V., Oskolok K.V., Bolotokov A.A. X-ray fluorescent determination of cerium in extraction phosphoric acid and phosphate concentrates // World of sulfur, N, P and K. 2012. No 4. p. 10-13. (In Russ.)

5. Yunovidov D.V., Sokolov V.V., Oskolok K.V., Bolotokov A.A. X-ray fluorescence determination of rare earth elements after sorption extraction and concentration from extraction phosphoric acid // Phosphate raw materials: production and processing. 2013. p. 147-151. (In Russ.)

6. Yunovidov D.V., El-Salim S.Z., Oskolok K.V. Restoration of homogeneous system spectrum according to time dependencies of line intensities in nascent and developing heterogeneous system on the example of extraction phosphoric acid // VIII All-Russian Conference on X-ray Spectroscopy. Irkutsk, September 22 - 26, 2014 Abstracts of the reports. - Irkutsk. Institute of the Earth's Crust, SB RAS, 2014. p. 139-139. (In Russ.)

7. Yunovidov D.V., El-Salim S.Z., Oskolok K.V. Virtual experiment technique and its application for quantitative X-ray fluorescence analysis of phosphoric acid extraction. // VIII All-Russian Conference on X-ray Spectroscopy. Irkutsk, September 22 - 26, 2014 Abstracts of the reports. - Irkutsk. Institute of the Earth's Crust, SB RAS, 2014. p. 140-140. (In Russ.)

8. Yunovidov D.V., Rebrikova A.T., Oskolok K.V., Sokolov V.V. X-ray fluorescence determination of technologically important elements in extraction phosphoric acid // The Second Congress of Russian Analysts. Moscow, September 23 - 27, 2013 Abstracts of the reports. Moscow. p. 289-289. (In Russ.)

9. Yunovidov D.V., Rebrikova A.T., Oskolok K.V., Sokolov V.V. The technique of a virtual experiment for quantitative X-ray fluorescence analysis of extracted phosphoric acid // The Second Congress of Russian Analysts. Moscow, 23 - 27 September 2013 Abstracts. Moscow. p. 290-290. (In Russ.)

10. Yunovidov D., Sokolov V., Bahvalov A. Big data analysis and comprehensive analytical control of fertilizers, 11 Winter School of Chemometrics (WSC 11). St. Petersburg, Russia, 2018. Thesis (In Russ.).

Further development of this work you can see on this site. The show is still go on!


text:
### Kiss Joy As It Flies

$\bullet$Here’s “On2: transfinite number hacking”. Lieven le Bruyn’s NEVERENDINGBOOKS isn’t really a blog at all… and in some earlier version, I’d failed to “get it”. My bad. This is some amazing stuff: advanced mathematics in very readable style. “Mumford’s Treasure Map” is a mini-masterpiece.
$\bullet$The fact that I never even thought to go look at last Friday’s Carnival (at Concrete Nonsense) is some kind of testimony to my recent preoccupation with my new computer.
$\bullet$Pat Ballew has been blogging about synthetic division (SD). This is a terrific find for me right now (even though I’ve recently scorned SD in my 148 class).

format: plain


text:
• Create Account

### #ActualHodgman

Posted 29 May 2013 - 09:02 PM

Why would oDepth be divided by oPos.w automatically?  It uses the TEXCOORD0 semantic, not SV_Position.

The position semantic is special -- it's used by the rasterizer to figure out how all the other values should be interpolated.

i.e. oDepth is divided by oPos.w automatically in-between the vertex and pixel shader, during rasterization/interpolation.
So if in the vertex shader you write "oDepth = oPos.z/oPos.w", then in the pixel shader, oDepth will equal oPos.z/oPos.w/oPos.w.

I had this slightly wrong; what happens in normal usage is that the PS receives:
PS.input.oDepth = interpolate(oPos.z/oPos.w)*interpolate(oPos.w)

if in the vertex shader you write "oDepth = oPos.z/oPos.w", then in the pixel shader you get:
PS.input.oDepth = interpolate(oPos.z/oPos.w/oPos.w)*interpolate(oPos.w)

Say you've got some regular code like this:
VS:
output.pos = mul(...);
output.texcoord = ...
PS:
float color = tex2D( input.texcoord );
The hardware will perform perspective correct interpolation of all your PS-inputs/VS-outputs.
It does this by:
1) At the end of the vertex shader, every interpolant is divided by w.
2) An extra hidden interpolant is created, which holds the value of 1/w.
3) At the start of the pixel shader, every interpolant is divided by the interpolated value of 1/w.

Thanks to the GPU doing this behind the scenes, you get results like in Image A here, otherwise if the GPU didn't do this, you'd get results like in Image B, which looks like PS1 games did...

If you want to disable perspective-correction and see the PS1-esque results for yourself, then at the end of your vertex shader, perform the perspective division yourself (which also sets w to 1, which disables the above 3 steps)
output.position /= output.position.w;//disable hardware perspective correction
If you want to verify that the above 3 steps are what actually happens, then create the hidden "1/w" interpolant yourself and use it in the PS:
VS:
output.texcoord /= output.position.w; // step 1
output.hidden = 1/output.position.w; // step 2
output.position /= output.position.w;//disable hardware perspective correction
PS:
input.texcood /= input.hidden; // step 3
This code should give you the same results as the regular, built-in hardware version... except that doing "output.position /= output.position.w" in the VS can cause the GPU to cause some clipping problems, etc...

However, none of this is necessary. Just use a depth-stencil target instead of a colour target, and don't do anything special to output depth besides just rasterizing triangles as usual and have the hardware write them to the depth buffer.

^This is worth repeating though. If you simply want to output z/w to a texture, then use a depth-stencil target and just let the rasterizer do it all automatically.

### #2Hodgman

Posted 29 May 2013 - 09:00 PM

Why would oDepth be divided by oPos.w automatically?  It uses the TEXCOORD0 semantic, not SV_Position.

The position semantic is special -- it's used by the rasterizer to figure out how all the other values should be interpolated.

i.e. oDepth is divided by oPos.w automatically in-between the vertex and pixel shader, during rasterization/interpolation.
So if in the vertex shader you write "oDepth = oPos.z/oPos.w", then in the pixel shader, oDepth will equal oPos.z/oPos.w/oPos.w.

I had this slightly wrong; what happens in normal usage is that the PS receives:
PS.input.oDepth = interpolate(oPos.z/oPos.w)*interpolate(oPos.w)

if in the vertex shader you write "oDepth = oPos.z/oPos.w", then in the pixel shader you get:
PS.input.oDepth = interpolate(oPos.z/oPos.w/oPos.w)*interpolate(oPos.w)

Say you've got some regular code like this:
VS:
output.pos = mul(...);
output.texcoord = ...
PS:
float color = tex2D( input.tex );
The hardware will perform perspective correct interpolation of all your PS-inputs/VS-outputs.
It does this by:
1) At the end of the vertex shader, every interpolant is divided by w.
2) An extra hidden interpolant is created, which holds the value of 1/w.
3) At the start of the pixel shader, every interpolant is divided by the interpolated value of 1/w.

Thanks to the GPU doing this behind the scenes, you get results like in Image A here, otherwise if the GPU didn't do this, you'd get results like in Image B, which looks like PS1 games did...

If you want to disable perspective-correction and see the PS1-esque results for yourself, then at the end of your vertex shader, perform the perspective division yourself (which also sets w to 1, which disables the above 3 steps)
output.position /= output.position.w;//disable hardware perspective correction
If you want to verify that the above 3 steps are what actually happens, then create the hidden "1/w" interpolant yourself and use it in the PS:
VS:
output.texcoord /= output.position.w; // step 1
output.hidden = 1/output.position.w; // step 2
output.position /= output.position.w;//disable hardware perspective correction
PS:
input.texcood /= input.hidden; // step 3
This code should give you the same results as the regular, built-in hardware version... except that doing "output.position /= output.position.w" in the VS can cause the GPU to cause some clipping problems, etc...

However, none of this is necessary. Just use a depth-stencil target instead of a colour target, and don't do anything special to output depth besides just rasterizing triangles as usual and have the hardware write them to the depth buffer.

^This is worth repeating though. If you simply want to output z/w to a texture, then use a depth-stencil target and just let the rasterizer do it all automatically.

### #1Hodgman

Posted 29 May 2013 - 08:57 PM

Why would oDepth be divided by oPos.w automatically?  It uses the TEXCOORD0 semantic, not SV_Position.

The position semantic is special -- it's used by the rasterizer to figure out how all the other values should be interpolated.

i.e. oDepth is divided by oPos.w automatically in-between the vertex and pixel shader, during rasterization/interpolation.
So if in the vertex shader you write "oDepth = oPos.z/oPos.w", then in the pixel shader, oDepth will equal oPos.z/oPos.w/oPos.w.

I had this slightly wrong; what happens in normal usage is that the PS receives:
PS.input.oDepth = interpolate(oPos.z/oPos.w)*interpolate(oPos.w)

if in the vertex shader you write "oDepth = oPos.z/oPos.w", then in the pixel shader you get:
PS.input.oDepth = interpolate(oPos.z/oPos.w/oPos.w)*interpolate(oPos.w)

Say you've got some regular code like this:

VS:
output.pos = mul(...);
output.texcoord = ...
PS:
float color = tex2D( input.tex );

The hardware will perform perspective correct interpolation of all your PS-inputs/VS-outputs.
It does this by:
* At the end of the vertex shader, every interpolant is divided by w.
* An extra hidden interpolant is created, which holds the value of 1/w.
* At the start of the pixel shader, every interpolant is divided by the interpolated value of 1/w.

Thanks to the GPU doing this behind the scenes, you get results like in Image A here, otherwise if the GPU didn't do this, you'd get results like in Image B, which looks like PS1 games did...

If you want to disable perspective-correction and see the PS1-esque results for yourself, then at the end of your vertex shader, perform the perspective division yourself (which also sets w to 1, which disables the above 3 steps), create the hidden "1/w" interpolant yourself and use it in the PS.

output.position /= output.position.w;//disable hardware perspective correction

If you want to verify that the above 3 steps are what actually happens, then add:

VS:
output.hidden = 1/output.position.w;
output.texcoord /= output.position.w;

output.position /= output.position.w;//disable hardware perspective correction
PS:
input.texcood /= input.hidden;

This code should give you the same results as the regular, built-in hardware version... except that doing "output.position /= output.position.w" in the VS can cause the GPU to cause some clipping problems, etc...

However, none of this is necessary. Just use a depth-stencil target instead of a colour target, and don't do anything special to output depth besides just rasterizing triangles as usual and have the hardware write them to the depth buffer.

^This is worth repeating though. If you simply want to output z/w to a texture, then use a depth-stencil target and just let the rasterizer do it all automatically.

PARTNERS


text:
# Copying a reporters result to the clipboard

I'm working on past Advent of Code puzzles to warm myself up for this year's and I wanted to copy a result to the clipboard so I could paste it into the AOC website.

But I can't see an easy way to do it

Am I missing something simple or is the facility missing?

I came up with this method

and then selecting the value in list block and using ctrl-C on it

but its a big sledgehammer for a little job

you can use this block, but in order to copy a list, you need to do something like

[scratchblocks]
wait until(call (JSFunction [data] [let res = null; navigator.clipboard.writeText(data.toString()).then(_ => { res = data; ).catch(err => {throw err;}); return () => res;] :: operators) with inputs [what you need to copy]:: control
[/scratchblocks]

we can't see the whole code.

Not the same code, but this one would work: (takes a parameter data) const d = typeof data === 'string' ? data : JSON.stringify(data, null, 2); navigator.clipboard.writeText(d); note that running multiple times doesn't guarantee the first one is done before the second runs.

The problem is that navigator.clipboard.writeText is asynchronous, and you need to wait for the returned promise to resolve before doing the next action.

The best solution would be js function blocks to be async/awaitable


text:
# Geometric Series and the Sum to Infinity

## Geometric Series

Much like for arithmetic series, the word ‘series‘ indicates that we should be adding a set of given numbers together.  However, the word ‘geometric‘ indicates that the numbers in the series are increasing (or decreasing) by the same factor. We call this the common ratio and is usually denoted $r$. For example, 1+2+4+8+16+32 is a geometric series with common ratio $r=2$. We refer to the numbers in the series as ‘terms‘. So, this geometric series has 6 terms and the first term is 1. We usually denote the number of terms $n$ and the first term $a$. It follows that the general geometric series is as follows:

$a+ar+ar^2+ar^3+…+ar^{n-1}$

Note that the final or nth term in this series is the first term multiplied by the common ratio just $n-1$ times.  If there are more terms, we may refer to the nth term in any geometric series as $u_n=ar^{n-1}$. You should memorise this. It is also possible to add all of the terms (or just the first n terms) of any geometric series using the formula

$S_n=\frac{a\left(1-r^n\right)}{1-r}$

The ‘$S$’ stands for ‘sum’. This formula is given in the Edexcel formula booklet. See below for proof of the formula and see Examples 1 and 2 for some geometric series and their summations.

Note that we can also use sigma notation to write a geometric series in shorthand. $a+ar+ar^2+ar^3+…+ar^{n-1}$ can be written as $\sum_{k=1}^nar^{k-1}$. It follows that $\sum_{k=1}^nar^{k-1}=\frac{a\left(1-r^n\right)}{1-r}$ and we can use the summation formula to find the sum of any geometric series given in sigma notation. See Example 4 or see more on how to use sigma notation.

### Proof of the formula for $S_n$

The proof of the formula is started off by writing out $S_n$ so the terms are visible. The … indicates that there are some terms in between that follow the pattern as expected. We then multiply both sides by the common ratio $r$:

$S_n=a+ar+ar^2+ar^3+…+ar^{n-1}$

$rS_n=ar+ar^2+ar^3+ar^4+…+ar^{n}$

noting that both lines have most terms in common except there is an $a$ in the top and an $ar^n$ in the bottom. We proceed by subtracting the bottom from the top giving:

$S_n-rS_n=a-ar^{n}$

We then factorise to get:

$S_n(1-r)=a(1-r^n)$.

Hence, obtaining $S_n=\frac{a\left(1-r^n\right)}{1-r}$ as required by dividing both sides by $(1-r)$.

### Sum to infinity for Geometric Series

Unlike with arithmetic series, it is possible to take the sum to infinity with a geometric series. This means that we may allow the terms to continue to be added forever. This is only possible, however, if the terms in the series are decreasing in size. It follows that it is possible to take the sum to infinity when the common ratio is between -1 and 1 but (not inclusive). We write $-1<r<1$ or $\vert r\vert <1$ (see more on modding). The common ratio cannot be 1 because the terms will remain the same (or alternate in sign when $r=-1$) and adding on the same number forever will result in an infinite answer. We say that it is possible to sum to infinity when the series converges and this happens when $\vert r\vert <1$. The result when summing to infinity is given by

$S_\infty=\frac{a}{1-r}, \hspace{30pt} \vert r\vert <1$

Note that this is the same as the formula for $S_n$ if we let $n\rightarrow\infty$. This is because $r^n\rightarrow 0$ as $n\rightarrow\infty$ if $\vert r\vert<1$. See Example 4 to see how to use the sum to infinity.

## Geometric Series Examples

Find the 12th term and the sum of the first 12 terms for the following geometric series:

$3+6+12+24+48+…$

The 3rd term of a geometric sequence is $3$ and the 10th term is $-6561$. Find the first term $a$ and the common ratio $r$.

The sum of the first $k$ terms of a geometric series whose nth term is defined by $u_n=4\times (0.75)^{n-1}$ is 15.97146 to 5 decimal places. Find $k$.

Evaluate the following:

1. $\sum_{i=1}^{15}7\left(\frac{2}{3}\right)^i$
2. $\sum_{i=1}^{\infty}7\left(\frac{2}{3}\right)^i$


text:
# Shear rate calculation in LBM

I want to calculate the shear rate magnitude in LBM. The individual components of the shear rate tensor can be calculated in LBM as given below in the first equation. Now I am confused about how to calculate the magnitude? I have seen 3 different formulae (as shown in Equations 2, 3, and 4).

is the second invariant of the tensor. Please suggest which one is the correct formula with proper explanation.

To my knowledge it’s the first variant. I also think that’s the way it’s computed in Palabos.


text:
# Statistics - Multinomial Distribution

A multinomial experiment is a statistical experiment and it consists of n repeated trials. Each trial has a discrete number of possible outcomes. On any given trial, the probability that a particular outcome will occur is constant.

## Formula

${P_r = \frac{n!}{(n_1!)(n_2!)...(n_x!)} {P_1}^{n_1}{P_2}^{n_2}...{P_x}^{n_x}}$

Where −

• ${n}$ = number of events

• ${n_1}$ = number of outcomes, event 1

• ${n_2}$ = number of outcomes, event 2

• ${n_x}$ = number of outcomes, event x

• ${P_1}$ = probability that event 1 happens

• ${P_2}$ = probability that event 2 happens

• ${P_x}$ = probability that event x happens

### Example

Problem Statement:

Three card players play a series of matches. The probability that player A will win any game is 20%, the probability that player B will win is 30%, and the probability player C will win is 50%. If they play 6 games, what is the probability that player A will win 1 game, player B will win 2 games, and player C will win 3?

Solution:

Given:

• ${n}$ = 12 (6 games total)

• ${n_1}$ = 1 (Player A wins)

• ${n_2}$ = 2 (Player B wins)

• ${n_3}$ = 3 (Player C wins)

• ${P_1}$ = 0.20 (probability that Player A wins)

• ${P_1}$ = 0.30 (probability that Player B wins)

• ${P_1}$ = 0.50 (probability that Player C wins)

Putting the values into the formula, we get:

${ P_r = \frac{n!}{(n_1!)(n_2!)...(n_x!)} {P_1}^{n_1}{P_2}^{n_2}...{P_x}^{n_x} , \\[7pt] \ P_r(A=1, B=2, C=3)= \frac{6!}{1!2!3!}(0.2^1)(0.3^2)(0.5^3) , \\[7pt] \ = 0.135 }$


text:
# Cleaner Lunar Arithmetic in Rust

Another day, a slightly better way to implement Lunar Arithmetic in Rust. Give the previous post a read if you need a quick refresher on what Lunar integers are. Otherwise, here are two better (I hope) ways to solve the same problem.

# Lunar Arithmetic in Rust

I’ve been playing with various languages / language design a lot recently (inspired by my Runelang series). As I tweak and change what I’d like to implement in a language… I kept finding myself coming back to more or less exactly how Rust looks (albeit without the borrowing). So… that seems like a pretty good reason to start picking up some Rust. In another thread of thought, I stumbled upon two OEIS (on-line encyclopedia of integer sequences) sequences: A087061: Array T(n,k) = lunar sum n+k (n >= 0, k >= 0) read by antidiagonals and A087062: Array T(n,k) = lunar product n*k (n >= 1, k >= 1) read by antidiagonals.

# Tupper's self-referential formula

Quick post today. Let’s implement Tupper's self-referential formula in Racket!

\frac{1}{2} < \left \lfloor mod \left ( \left \lfloor \frac{y}{17} 2^{-17 \lfloor x \rfloor - mod(\lfloor y \rfloor, 2)} \right \rfloor, 2 \right ) \right \rfloor
(tupper 960939379918958884971672962127852754715004339660129306651505519271702802395266424689642842174350718121267153782770623355993237280874144307891325963941337723487857735749823926629715517173716995165232890538221612403238855866184013235585136048828693337902491454229288667081096184496091705183454067827731551705405381627380967602565625016981482083418783163849115590225610003652351370343874461848378737238198224849863465033159410054974700593138339226497249461751545728366702369745461014655997933798537483143786841806593422227898388722980000748404719)

That’s the result of graphing the above function at a point rather far away from the origin. Specifically, where y is around that crazy big number. Look familiar?

# Minimal palindromic base

What’s this? Two posts in one day? Well, writing a static blog generator can do that. 😄

Another easily phrased challenge:

We have a simple little problem today: Given an integer n > 2, find the minimum b > 1 for which n base b is a palindrome.

Minimal Palindromic Base via Programming Praxis


text:
# An extension of typically-real functions and associated orthogonal polynomials

@article{Naraniecka2011AnEO,
title={An extension of typically-real functions and associated orthogonal polynomials},
author={Iwona Naraniecka and Jan Szynal and Anna Tatarczak},
journal={Annales Umcs, Mathematica},
year={2011},
volume={65},
pages={99-112}
}
• Published 2011
• Mathematics
• Annales Umcs, Mathematica
Two-parameters extension of the family of typically-real functions is studied. The definition is obtained by the Stjeltjes integral formula. The kernel function in this definition serves as a generating function for some family of orthogonal polynomials generalizing Chebyshev polynomials of the second kind. The results of this paper concern the exact region of local univalence, bounds for the radius of univalence, the coefficient problems within the considered family as well as the basic…
Constrained coefficients problem for generalized typically real functions
• Mathematics
• 2016
For let denote the class of generalized typically real functions i.e. the class of functions of a form where , and is the unique probability measure on the interval . For the same range of
An Extension of the Chebyshev Polynomials
Our consideration is focused on determining properties of generalized Chebyshev polynomials of the first and second kind, sparking interest in constructing a theory similar to the classical one. This
A Certain Subclass Of Uniformly Convex Functions With Negative Coefficients Defined By Gegenbauer Polynomials
• Mathematics
• 2020
In dis paper, we introduce a new subclass of uniformly convex functions wif negative coefficients defined by Gegenbauer polynomials. We obtain teh coefficient bounds, growth distortion properties,
ON CERTAIN SUBCLASS OF ANALYTIC FUNCTIONS ASSOCIATED WITH GEGENBAUER POLYNOMIALS
In this work, the authors considered a new subclass TGλ,t(α, β) consisting of analytic univalent functions with negative coefficients define by Gegenbauer polynomials. Coefficient inequalities,
Coefficient inequalities related with typically real functions
• Mathematics
• 2020
Abstract In this paper, we are mainly interested to study the generalization of typically real functions in the unit disk. We study some coefficient inequalities concerning this class of functions.
Subclasses of Yamakawa-Type Bi-Starlike Functions Associated with Gegenbauer Polynomials
• Mathematics
Axioms
• 2022
In this paper, we introduce and investigate new subclasses (Yamakawa-type bi-starlike functions and another class of Lashin, both mentioned in the reference list) of bi-univalent functions defined in
A New Subclass of Analytic Functions Related to Mittag-Leffler Type Poisson Distribution Series
• Mathematics
• 2021
The object of this work is to an innovation of a class in with negative coefficients, further determining coefficient estimates, neighborhoods, partial sums, convexity, and compactness of this
On Coefficients Problems for Typically Real Functions Related to Gegenbauer Polynomials
• Mathematics
• 2017
We solve problems concerning the coefficients of functions in the class $$\mathcal {T}(\lambda )$$T(λ) of typically real functions associated with Gegenbauer polynomials. The main aim is to determine
Distortion theorems for certain subclasses of typically real functions
In this paper we discuss the class T ( 1 ) of typically real functions in the unit disk � = {z 2 C : |z| < 1} which are given by the formula
Generalized Typically Real Functions
• Mathematics
• 2016
Let $f(z) = z+a_2 z^2+\cdots$ be regular in the unit disk  and real valued if and only if $z$ is real and $|z| < 1$. Then $f$ is said to be typically real function. Rogosinski found the necessary and

## References

SHOWING 1-10 OF 12 REFERENCES
An extension of the Chebyshev polynomials
• Mathematics, Computer Science
• 2005
Domains of Univalence for Typically-real Odd Functions
• Mathematics
• 2003
The univalence problems in the class of typically-real functions were considered by Golusin [G. Golusin (1950). On typically-real functions, (Russian). Mat. Sb. , 27 (69), 201-218]. He proved that
Basic Hypergeometric Series
• Mathematics
• 1990
Foreword Preface 1. Basic hypergeometric series 2. Summation, transformation, and expansion formulas 3. Additional summation, transformation, and expansion formulas 4. Basic contour integrals 5.
A short proof of an inequality used by de branges in his proof of the bieberbach, robertson and milin conjectures
Clausen's formula for the product of two hypergeometric series and a summation formula are used to give a short proof of an inequality used by de Branges in his proof of the Bieberbach, Robertson,
q -extensions of Clausen's formula and of the inequalities used by de Brangesin his proof of the Bieberbach, Robertson, and Milin conjectures
A q-extension of the terminating form of Clausen’s ${}_3 F_2$ series representation for the square of a ${}_2 F_1 (a,b;a + b + {1 / 2};z)$ series is derived. It is used to prove the nonnegativity of
Chebyshev Polynomials, Chapman and Hall/ CRC
• Boca Raton, FL,
• 2003


text:
# Math Help - division on paper

1. ## division on paper

i have been out of school for thirteen years now.
i have some exams and courses coming up and i now realise to my horror that i have forgotten how to do working out of division on paper please help!!

2. Originally Posted by jcdustyguy
i have been out of school for thirteen years now.
i have some exams and courses coming up and i now realise to my horror that i have forgotten how to do working out of division on paper please help!!
Let me do 1560 divided by 7.

Thus we have,
Code:
1560 : 7
First 7 does not go into 1, we move to the next digits, "15"
It goes into 15 twice.

Code:
1560 : 7 = 2
Now multiply by 2 and subtract from first two digits.

Code:
1560 : 7 = 2
-14
----
1
Bring down the other digits,
Code:
1560 : 7 = 2
-14
----
160
Do the same thing 7 does not go into 1 move to next digits. "16" It goes in twice.
Code:
1560 : 7 = 22
-14
---
160
-14
----
20
Same thing move other to "20" it goes in 2.
Code:
1560 : 7 = 222
-14
----
160
-14
---
20
-14
---
6
Since you cannot do anything with 6 that is the remainder.
Thus the answer is 222 Remanider 6.


text:
# Revenue put options gain popularity in US power markets

## Morgan Stanley seen as top dealer in emerging risk management niche

The past few years have been tough on US power generators. As the shale boom has unleashed plentiful supplies of cheap natural gas, and improvements in energy efficiency have caused electricity demand to flatline, power prices in many parts of the country have been stuck in a multi-year slump.

Against that backdrop, a new type of bespoke hedging tool has grown increasingly popular among those investors willing to take a long view and construct new power plants. Called the revenue put option, it enables the owners of a power plant to place a floor under the revenues that they can expect to get from that facility over a specified period of time, typically around five years in most recent deals, market sources say. The details are complex, but the idea is simple: by purchasing a revenue put, a firm building a new plant can protect the downside risk on its investment, while retaining exposure to upside – an attractive prospect if one believes that US power prices are set to rebound.

"Revenue puts have become much more prevalent in the last three years than they had been previously," says Mitchell Carroll, a Boston-based partner at law firm Morgan Lewis who has advised on several power-plant transactions involving the product. "I do see it as an increasing trend."

Market sources familiar with revenue puts – including dealers, power plant developers, lawyers and risk management consultants – stress that transactions involving the structure are still rare, with perhaps half a dozen executed over the past 12 months. Most of those deals have involved a small number of private equity firms or developers building natural gas-fired plants, although there have also been cases of renewable developers using the structure for wind farms.

Moreover, only a small number of dealers are in the business of writing revenue puts. In fact, sources say just one dealer has executed the majority of such transactions in recent years: Morgan Stanley.

###### Revenue puts have become much more prevalent in the last three years than they had been previously

While Morgan Stanley declined to comment, a source close to the bank says its commodities unit developed and refined the product in response to the needs of the marketplace and has since enjoyed a brisk business in writing revenue puts for clients. "Many developers and investors have a view that markets will strengthen over time, so a hedge product that leaves no upside was unpalatable to many of them," says the source. "Thus the revenue put. We believe that projects are being developed with the benefit of this product that would otherwise not see the light of day."

Other dealers that have written revenue puts for clients or are actively seeking to get in the business, sources say, include BP Energy Company, the North American gas and power trading arm of the UK oil major; Citi; Macquarie; and Shell Trading Risk Management, the US energy derivatives-trading unit of Royal Dutch Shell. BP, Citi and Shell all confirm their involvement in the marketplace, while Macquarie declined to comment.

Power plant developers that have used the product praise it as a useful solution, but they complain that the cost is too high. Due to the illiquidity of the market and limited number of dealers, the premiums that a developer must pay for a revenue put can be quite steep, they say.

"With revenue puts, the main benefit is, obviously, that they don't lock in the upside," says Sherman Knight, chief commercial officer at Competitive Power Ventures (CPV), a Maryland-based developer that has recently used the product to hedge its revenues for a natural gas-fired power plant in New York state. "They protect the downside to allow for the debt financing to be placed. But you have to weigh that benefit against the cost of the option premium that you're paying."

Cost isn't the only concern when it comes to revenue puts. Investors and developers paying out millions of dollars for the highly customised product should be sure to read the fine print, say risk management consultants specialising in US power deals. Depending on how each contract is designed, the consultants say, the revenue put may not provide the protection that customers are expecting.

### From PPAs to revenue puts

Revenue puts can be seen as the latest step in the evolution of hedging tools used in the electricity industry, building on power purchase agreements (PPAs) and heat rate call options.

Traditionally, the most conservative way for a power plant developer to secure the revenues from their investment has been through a PPA – a simple physical forward transaction in which they commit to sell electricity from their plant to a customer, such as a utility, for a fixed period of time, sometimes as long as 20 years or more.

But PPAs have become less attractive to developers as electricity prices have slumped. According to Platts, the New York-based energy market data provider, the average day-ahead peak price at PJM West Hub – the most liquid trading hub in the eastern US – fell from $83.29 per megawatt-hour (/MWh) in 2008 to$45.46/MWh in the first 10 months of this year. Prices on the US west coast have collapsed too, with the average peak price for Mid-Columbia, a major trading hub in the northwest US, sinking from $64.85/MWh to$26.65/MWh over the same time period (see figure 1).

"I am very reluctant to get into a long-term PPA where I have to give up all my potential upside to someone else for as many as 10, 15 or 20 years," says Tom Festle, the Chicago-based chief financial officer of E.on Climate & Renewables North America, a developer largely specialising in wind power. "The discount attached to PPAs right now is just so punitive for us, as a developer, that I don't want to enter into a PPA. I'd much rather enter into a revenue put."

Meanwhile, those developers still interested in PPAs have found it harder to find counterparties willing to buy their electricity. Because of the low prices, utilities that previously might have committed to buy power through PPAs see less urgency in doing so – and that, too, has led developers to turn to other types of hedging instruments, including revenue puts. "Much of this comes out of the fact that PPAs have become more difficult to source from the developers' and sponsors' standpoint," says Carroll, the lawyer with Morgan Lewis.

More complex than the PPA is the heat rate call option, which is still widely used by owners of gas-fired power plants. Such instruments – a type of financially settled, over-the-counter derivative – let generators manage their exposure to so-called ‘spark spreads'. A spark spread is the difference in the price of electricity sold by a generator and the price that the generator must pay for its gas. When power prices at a particular location are high and gas prices are low, spark spreads are wide and power plant owners can make a great deal of money; conversely, when the differentials collapse and spark spreads narrow, power plant owners may find it unprofitable to run their units and their profits are zero.

The conditions under which a power plant is profitable, then, depend on the prevailing market prices for power and gas, as well as on the ‘heat rate' of the power plant, a measure of its efficiency at converting gas into electricity. Those plants that are more efficient, with lower heat rates, can more easily reach the point of profitability as spark spreads widen. The least efficient plants, with the highest heat rates, need to wait until spark spreads are at their widest before they are profitable.

What that means is that a power plant can be modelled as a call option: its value is zero as long as the spark spread stays below a certain threshold; then, as the spark spread grows past that threshold, the value of the plant grows linearly along with it.

That's the reason why power plant owners can hedge their profits by selling heat rate call options. By selling a heat rate call option to a counterparty, the power plant owner collects a premium. In return, the power plant owner must pay their counterparty if the spark spread widens beyond the strike agreed in the options contract. However, under such conditions, they can also expect their gas-fired plant to be running profitably, so the cashflows from the plant should cover the cost of those payouts. If the terms of the heat rate call option contract are perfectly matched to the economics of the power plant, then the contract serves as a perfect hedge, allowing the plant's owner to collect a stable cashflow regardless of what happens to spark spreads.

Having a stable cashflow, though, is unappealing to investors and developers that want to retain exposure to upside. Like PPAs, heat rate call options are a way to lock in profits, not to put a floor underneath them and ride the market upwards if it rises. That's why revenue puts have emerged as an attractive alternative to heat rate call options, dealers say.

"In every conversation we have nowadays with project developers building new plants, the discussion centres around two types of instruments: the heat rate call option and the revenue put," says Ken Fleming, Connecticut-based senior vice-president of northeast origination at BP. "Sometimes these are used jointly. A project might be partly hedged with a heat rate call option and partly with a revenue put."

I am very reluctant to get into a long-term PPA where I have to give up all my potential upside to someone else for as many as 10, 15 or 20 years

The simplest way to understand a revenue put is to view it as an options contract in which the underlying of the contract is the revenue of the power plant in question. If the plant's revenue drops below a certain strike – $50 million per year, for example – then the seller of the put must pay the buyer the difference between the strike and the realised revenues. For instance, if the owner of a power plant buys a four-year revenue put from a bank, running from 2015 to 2018 and with a strike of$50 million per year, and the plant's revenues in 2016 actually come in at $40 million, the bank would need to pay the power plant owner$10 million that year to make up the difference.

That explanation, however, omits an important real-world detail. Dealers never actually sell revenue puts in which the underlying of the options contract is the actual, real-world revenue of the physical power plant that their clients are building. Instead, the underlying is the revenue of a hypothetical plant modelled off of the real-life facility. In other words, the contract will specify all the parameters of such a ‘synthetic unit', including the location at which it buys gas and the location at which it sells power, as well as its heat rate and other physical characteristics. Taken together, all that can be used to calculate how much revenue the plant should be earning under various market conditions.

So when the time comes for the dealer to make payouts under the revenue put – often once a quarter or once a year for the duration of the contract – the dealer runs the model and calculates how much the synthetic unit should have earned in the preceding time period. If the revenues of the synthetic unit are less than the strike, the dealer makes the necessary payout.

As long as the performance of the synthetic unit mirrors the performance of the real-world power plant, the owner of the plant can count on having a reliable hedge. "To provide an effective hedge, the revenue put is structured to represent the operating characteristics of the plant as closely as possible," explains Carla Vincitore, Houston-based president of Shell Trading Risk Management.

Meanwhile, dealers gain an important advantage by selling revenue puts based on the hypothetical revenues of synthetic units rather than the real revenues of real plants: they can more easily manage their risk. For instance, they can manage their exposure to gas and power prices based on the indexes and locations used in their model, rather than the prices actually seen by the plant operator, which might be tied to illiquid gas hubs or unusual, out-of-the-way power pricing points.

Importantly, the use of the synthetic unit also means that dealers are not exposed to the operational risk of running a power plant. For example, a dealer does not need to worry about the risk that a plant's operators will make a mistake and lose out on potential profits by failing to run the plant on a day when market conditions are favourable. Such an operator mistake would impact the revenues of the real-life power plant but not the idealised revenues of the synthetic unit.

### Sophisticated players

All that complexity means revenue puts are not for the faint-hearted. That's why most deals employing this structure have involved projects backed by private equity firms, says Morgan Lewis's Carroll. "Energy projects that are sponsored by the private equity firms are really pushing these forward," he says. "It's the financial savviness of the private equity firms that gets them comfortable, because they can truly understand the instrument that they're entering into."

Besides CPV, firms said to have used revenue puts include New York-based Energy Investors Fund (EIF), a power-focused private equity group; I Squared Capital, a New York-based infrastructure investment firm; LS Power, a New York-based power developer; and Panda Power Funds, a Dallas-based private equity fund manager specialising in generation.

EIF, which was acquired last year by Los Angeles-based alternative asset manager Ares Management, confirmed in an email to Risk.net that it had used revenue puts for recent projects in New Jersey and Ohio. I Squared Capital and LS Power did not respond to repeated requests for comment. Panda declined to comment, but it has previously disclosed using revenue puts for a pair of natural gas-fired power plant projects in Texas.

Energy projects that are sponsored by the private equity firms are really pushing these forward. It's the financial savviness of the private equity firms that gets them comfortable, because they can truly understand the instrument that they're entering into

Industry sources say most revenue put deals have taken place in the northeast US – in the deregulated electricity markets of New York, New England and PJM, which covers many of the mid-Atlantic states – as well as in Texas. That is largely because those areas have the most liquid spot markets for electricity, a necessary precondition for the structure to work.

Another factor that may be driving such deals in the northeast US is the proximity of the gas-rich Marcellus Shale. "There is a big push right now to build natural gas-fired power plants in the parts of the US that have a lot of shale gas, but also a need to replace retiring coal-fired plants as well," says Mike Curry, Citi's Houston-based head of structured products and power sales for North America. "That's a big area of development right now, and it's where a lot of interest in revenue puts is coming from."

Dealers characterise the revenue put as a best-of-both-worlds solution, combining the security of a PPA with the potential upside of a pure merchant project – that is, a power plant that just sells electricity into the spot market. In the context of project finance, that means both debt and equity investors in a new-build power plant can find something to like.

"Revenue puts cater to the needs of both the debt and equity holders," says Anubhav Aggarwal, a Houston-based commodities originator at Citi. "Debt holders get the predictability of a floor on revenues, and the equity holders can participate in the upside based on their investment thesis of increased spark spreads."

Dealers also note that revenue puts are attractive to developers because they are relatively simple from a credit standpoint, compared to heat rate call options. If a developer chooses to hedge its new power plant investment by selling a heat rate option to its hedge provider, the hedge provider gains credit exposure to the developer – infinite credit exposure, in fact, because there is theoretically no upper limit on how much the developer might have to pay out. As a result, the developer typically needs to post collateral to mitigate the credit risk faced by the hedge provider. That often leads to complex negotiations in which the hedge provider ends up taking out a lien on the power plant, alongside the banks that are lending money to the developer, dealers say.

"The challenge with the heat rate call option is credit," says Shell's Vincitore. "Selling the heat rate call option can be problematic since buyers of the heat rate call option will have exposure to the generator when the time comes to call on the option and deliver on its obligations. With no credit history, typically a large letter of credit is required or a first lien."

But if the power plant developer hedges with a revenue put, the situation is "just the opposite", says Vincitore. Once the developer pays the put premium – a one-time payment – the hedge provider no longer faces credit risk from the developer. "The credit exposure in this case is reversed, leaving the generator with credit exposure to its counterparty," Vincitore says. That relieves the developer of the need to post collateral.

### Hidden risks

Like any complex product, revenue puts can contain hidden risks for customers that don't fully know what they are getting into.

Risk management consultants who have studied the product say the main danger lies in mismatches between the synthetic unit used in the revenue put and the real-life power plant it is seeking to model. Such mismatches can lead to hedge malfunctions, in which the product will not pay out as much as the power plant owner expects.

Such mismatches can arise because the needs of the dealer and the power plant owner are different, says Greg Sticka, founding partner of Scoville Risk Partners, a New York-based advisory group. While the dealer wants a model that makes it easy to lay off risk in the marketplace, the power plant owner wants a model that hews as closely as possible to the unique characteristics of their plant.

"What's good for the dealer – in terms of a gas delivery point, for example – might not be great from the perspective of the plant owner," says Sticka, whose firm has advised clients on hedging with revenue puts. "In bad times it might cause pain and agony."

What's good for the dealer – in terms of a gas delivery point, for example – might not be great from the perspective of the plant owner. In bad times it might cause pain and agony

For example, consider a natural gas-fired power plant that purchases its fuel at prices tied to the Transco Zone 6 index, which reflects prices for gas deals taking place across an area running from Maryland to New York. The plant's owner may have hedged with a revenue put whose synthetic unit uses gas prices at Tetco M3, a trading hub in Pennsylvania, plus a fixed differential in order to model the exposure of the real-life plant. That may function much of the time, but if there is an unexpected blow-out between Tetco M3 and Transco Zone 6 prices, the plant's owner might discover that the hedge does not work as expected, says Glen Swindle, managing partner of Scoville Risk Partners.

"In extreme cold, your gas prices might be really high, so your unit would hardly be running and you wouldn't be making any money, but the synthetic M3 unit would be happily boogieing along, generating lots of power," Swindle says. "So you wouldn't get compensated by the revenue put. You might have thought that your revenues were covered at $50 million a year, but they're not. If the synthetic unit is minting money and your actual unit is not, that$50 million floor doesn't hold."

Swindle also warns that customers should be on the lookout for 'gaming' in the structure of the revenue put – that is, features that enable the synthetic unit to perform in a idealised, highly optimal way that the power plant operator could never hope to achieve in real life.

"Many of these structures allow the dealer to look back every month or every quarter and say, in the rear-view mirror, how they would have liked to run the synthetic unit; that can be benign, but if you have the wrong features in the structure, the result can be quite delightful for the dealer," Swindle says.

"In real life, if you're dispatching a unit, you need to make a decision today about how you'd like to bid the unit in for tomorrow." he explains. "You're faced with noisy and polluted information; you don't know exactly what will transpire with prices tomorrow. The way the derivative structure works, usually, is that at the end of the month, in the settlement period, the dealer can look back at actual, realised gas and power prices and say exactly how they would have liked to run the unit. If you have a bad structure, the dealer can exercise the option in a way that's unrealistically optimal, if you like, compared to what you can do with your actual asset."

### Dealer challenges

Dealers also face challenges when crafting revenue put options for their clients. For one thing, revenue puts are considered ‘swaps' under the US Dodd-Frank Act, meaning they are subject to reporting and record-keeping rules and other regulations pertaining to OTC derivatives.

More significantly, though, it is tricky for dealers to lay off the risk of revenue puts in the marketplace. With simpler products, dealers can find clients to take the opposite side of the trade. For instance, a bank that buys a crude oil swap from an oil producer can lay off its risk by turning around and selling a crude oil swap to an airline. But with highly bespoke structures such as revenue puts, it is not easy to find offsets, and dealers must resort to more clever approaches to managing the risk.

"It's a dynamic product that needs to be carefully managed," says BP's Fleming. "It's nonlinear, so you're dealing with delta positions that are changing with time and market prices, just like any other option that you're carrying on your book. To manage that, you need to have the appropriate systems in place to track your positions, and you need to have a trading desk that's robust enough to either hold those positions or find ways to offset the risk."

Morgan Stanley, the leading dealer of revenue puts, relies on diversification and its wide array of relationships with various counterparties to help lay off the risk, says the source close to the bank. "As hedge fund and dealer participation has waned, we have found that originating out of risk with other clients is the better approach," he says. "When we have good offsets for risk, we tend to be more competitive. When we don't, then we seem to lose deals to competitors that do."

Such difficulties help explain why only a handful of dealers are active in the space and why the number of revenue puts executed is so few. Festle, of E.on Climate & Renewables North America, says power plant developers such as himself would benefit if there were more dealers offering the product.

"I wish there were a better market for it," he says. "The market is thin, in terms of people willing to provide revenue puts, and a thin market means we have to pay disproportionately high and unattractive premiums. The more people in this market, the better for us."

Only users who have a paid subscription or are part of a corporate subscription are able to print or copy content.

To access these options, along with all other subscription benefits, please contact [email protected] or view our subscription options here: http://subscriptions.risk.net/subscribe