<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">AM</journal-id><journal-title-group><journal-title>Applied Mathematics</journal-title></journal-title-group><issn pub-type="epub">2152-7385</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/am.2014.52025</article-id><article-id pub-id-type="publisher-id">AM-42159</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Physics&amp;Mathematics</subject></subj-group></article-categories><title-group><article-title>
 
 
  An Automated Model for Fitting a Hemi-Ellipsoid and Calculating Eigenvalues Using Matrices
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>licia</surname><given-names>R. Billington</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Peter</surname><given-names>J. Fabri</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>William</surname><given-names>E. Lee III</given-names></name><xref ref-type="aff" rid="aff2"><sup>2</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib></contrib-group><aff id="aff2"><addr-line>College of Engineering, University of South Florida, Tampa, USA</addr-line></aff><aff id="aff1"><addr-line>College of Engineering, University of South Florida, Tampa, USA;USF Health Morsani College of Medicine, University of South Florida, Tampa, USA</addr-line></aff><author-notes><corresp id="cor1">* E-mail:<email>aliciabillington@gmail.com(LRB)</email>;<email>wlee2@usf.edu(WELI)</email>;</corresp></author-notes><pub-date pub-type="epub"><day>17</day><month>01</month><year>2014</year></pub-date><volume>05</volume><issue>02</issue><fpage>234</fpage><lpage>240</lpage><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
   Ellipsoid modeling is essential in a variety of fields, ranging from astronomy to medicine. Many response surfaces can be approximated by a hemi-ellipsoid, allowing estimation of shape, magnitude, and orientation via orthogonal vectors. If the shape of the ellipsoid under investigation changes over time, serial estimates of the orthogonal vectors allow time-sequence mapping of these complex response surfaces. We have developed a quantitative, analytic method that evaluates the dynamic changes of a hemi-ellipsoid over time that takes data points from a surface and transforms the data using a kernel function to matrix form. A least square analysis minimizes the difference between actual and calculated values and constructs the corresponding eigenvectors. With this method, it is possible to quantify the shape of a dynamic hemi-ellipsoid over time. Potential applications include modeling pressure surfaces in a variety of applications including medical. 
 
</p></abstract><kwd-group><kwd>Modeling; Response Surfaces; Ellipsoid</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>The Cartesian coordinate equation for an ellipsoid is given by the formula:</p><p>1)<inline-formula><inline-graphic xlink:href="tmlimages\3-7401819x\cab1e2c9-bfc0-4dde-b1a8-801c5004dfdd.png" xlink:type="simple"/></inline-formula>, where (h, j, k) represent the coordinates of the center of the ellipsoid and a, b, c represent the unit axis lengths from the center.</p><p>An alternate form of this equation is the matrix equation given by the formula:</p><p>2)<inline-formula><inline-graphic xlink:href="tmlimages\3-7401819x\d2a2a3cc-1678-48ac-bc7f-8bbc2c27b43c.png" xlink:type="simple"/></inline-formula>, where<inline-formula><inline-graphic xlink:href="tmlimages\3-7401819x\60853992-96ce-4416-8af1-d8549d5fafcd.png" xlink:type="simple"/></inline-formula>,<inline-formula><inline-graphic xlink:href="tmlimages\3-7401819x\33785266-275f-4b35-99a2-dd4c3c8a6eb4.png" xlink:type="simple"/></inline-formula>. This vector formulation provides size, shape, and orientation. The A matrix is assumed to be positive definite. Substitution gives the long form of the equation:</p><p>3)<inline-formula><inline-graphic xlink:href="tmlimages\3-7401819x\2c3db6fa-c315-42df-aff2-11a83a49ed49.png" xlink:type="simple"/></inline-formula>.</p><p>Here, the eigenvalues and eigenvectors of the A matrix give the corresponding squared length of the axis and the direction, respectively. Orthogonal eigenvectors are induced when the matrix is symmetric [<xref ref-type="bibr" rid="scirp.42159-ref1">1</xref>].</p><p>Previous papers have discussed using the method of least squares estimates (LSE) to converge on the ellipsoid best fit for a given set of data [2-5]. LSE analysis minimizes the sum of the distance (or squared difference) between the measured and predicted values of an ellipsoid. We have simplified this concept by implementing existing add-ins in Microsoft Excel such as Solver and Matrix.xla. Additionally, we have automated the process using VBA code so that as the hemi-ellipsoid alters shape and position we can continuously recalculate the new eigenvalues and eigenvectors of the ellipsoid.</p><p>Our goal was to create a program that automatically and continuously evaluates data from a pressure map for seated individuals. Currently, most medical institutions evaluate peak pressure when assessing patients for pressure build-up which can lead to pressure ulcer development. However, peak pressure is not the sole determinant in tissue breakdown [<xref ref-type="bibr" rid="scirp.42159-ref6">6</xref>]. Other studies have looked at using MRI and finite element analysis, but these studies do not use continuous data, are not over extended time periods, and involve significant expense [7-10]. The purpose of this analysis was to create a method that could show movement over time continuously and could be easily incorporated into existing care via a pressure map that many hospitals already own, without additional expenses.</p></sec><sec id="s2"><title>2. Transformation and Least Squares Estimation</title><sec id="s2_1"><title>2.1. Calculated Values</title><p>In order to assess the validity of the method, we first tested the ability of the program to predict the values of a known ellipsoid. We chose the simple ellipsoid defined by the following equation: <inline-formula><inline-graphic xlink:href="tmlimages\3-7401819x\7a55ae01-6427-4d39-a0b5-82af240ea166.png" xlink:type="simple"/></inline-formula></p><p>and considered only the superior half of the shape. We calculated the z values for x and y coordinates known to have corresponding values on the surface of the ellipsoid by solving for the unknown variable z:</p><p><inline-formula><inline-graphic xlink:href="tmlimages\3-7401819x\6a98d0cb-d94e-494e-9abd-b59a9e584b76.png" xlink:type="simple"/></inline-formula>.</p></sec><sec id="s2_2"><title>2.2 Predicted Values</title><p>The predicted values for z were calculated through minimization via quadratic optimization by gradient descent using the Solver Add-in in Microsoft Excel. Two models were created minimizing the absolute difference and the squared difference between z and<inline-formula><inline-graphic xlink:href="tmlimages\3-7401819x\2dd251eb-9fa0-4c14-ae75-5f0b1c519d41.png" xlink:type="simple"/></inline-formula>. The actual and predicted values from the model can be viewed in Table1 Multiple constraints were placed on the calculations. First, the equation for the matrix had to be satisfied (long form of equation above). Second, as previously mentioned, the <inline-formula><inline-graphic xlink:href="tmlimages\3-7401819x\cab486fa-40bd-456b-83ea-bed9a69ba078.png" xlink:type="simple"/></inline-formula> matrix must be made symmetric in order to assume orthogonal eigenvectors. Additional constraints on the <inline-formula><inline-graphic xlink:href="tmlimages\3-7401819x\6e863fe7-f10c-45ac-a3e2-757158722cdb.png" xlink:type="simple"/></inline-formula> matrix were made such that the matrix could be assumed positive definite. Finally, different lower bound values for <inline-formula><inline-graphic xlink:href="tmlimages\3-7401819x\8fe015d3-3c38-46e1-ade7-b7917b338f61.png" xlink:type="simple"/></inline-formula> were tested in order to allow Solver to find the optimal solution. We found that Solver was not always able to arrive at the best ellipsoid shape by simply allowing it to explore the surface on its own, but could converge if multiple values were tested. VBA code was written to create a loop to test various z <img src="3-7401819.files/image002.gif" />&#160;values and to select the value which minimized the sum of squared differences or the summed absolute difference. 3-D imaging of the selected predicted versus actual values are shown in Table2</p><p>The constraints are summarized here:</p><p>Objective Function:</p><p><img src="htmlimages\3-7401819x\6b76119c-3fad-47a8-a3f2-aa2fc4201b5c.png" /></p><p>Changing Cells:</p><p><img src="htmlimages\3-7401819x\c431edfc-daee-44cb-bd1d-c6796d288972.png" /></p><p><inline-formula><inline-graphic xlink:href="tmlimages\3-7401819x\44fdd177-f2e8-4313-aaa8-1293f0cde392.png" xlink:type="simple"/></inline-formula>matrix h, j Constraints:</p><p><img src="htmlimages\3-7401819x\3c74e964-7412-4405-b8f8-ec13fabbb169.png" /></p><p><img src="htmlimages\3-7401819x\b009cbb2-9896-4888-81d6-66b6ebd125d4.png" /></p><p>k = 0 the A matrix is assumed positive definite</p></sec></sec><sec id="s3"><title>3. Eigenvalue and Eigenvector Calculations</title><p>After the optimum predicted values were determined and thus the corresponding <inline-formula><inline-graphic xlink:href="tmlimages\3-7401819x\db09be6c-4c78-43b7-a487-2af235c7cc1d.png" xlink:type="simple"/></inline-formula> matrix, the program was automated to select the <inline-formula><inline-graphic xlink:href="tmlimages\3-7401819x\54756695-fd31-4304-9315-826b5dac8a91.png" xlink:type="simple"/></inline-formula> matrix and calculate the associated eigenvalues and eigenvectors, as shown in Table3 The Jacobi Method in Matrix.XLA [<xref ref-type="bibr" rid="scirp.42159-ref11">11</xref>] was employed in order to ensure forced orthogonal vectors. Once the eigenvalues were determined, the square roots of the values were calculated to give the axis lengths of the ellipsoid.</p></sec><sec id="s4"><title>4. Sample Data</title><p>After the validity of the program had been tested using a known ellipsoid, a 36 &#180; 36 sample data set of measured values from a pressure map was analyzed. An ellipsoid shape was identified from the data automatically and assessed for characteristics of shape and size. The program was able to identify center values for the ellipsoid and eigenvalues that visually made sense, as shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>. The calculated eigenvalues of 4.83, 8.38, and 71542.65 corresponded to x, y, and z-axes of 2.20, 2.90, and 267.47 respectively. Thus, we have illustrated that the program is capable of taking real data, locating an ellipsoid, and analyzing its shape.</p></sec><sec id="s5"><title>5. Discussion</title><sec id="s5_1"><title>5.1. Analysis</title><p>Analysis of the data shows the strength of this program in accurately predicting the ellipsoid shape of the data.</p><p>Statistical analysis based on the 13 actual and predicted values of the known ellipsoid showed a very low average error of −0.288% and average absolute error of 0.507%. The center coordinates of the ellipsoid calculated automatically by the program were also extremely accurate, with an average −1.06% error. As discussed above, the <inline-formula><inline-graphic xlink:href="tmlimages\3-7401819x\390f4d20-c67c-40e1-8f0e-21f077c25682.png" xlink:type="simple"/></inline-formula> matrix gave values close to the expected value of 0.25, as seen in Table3 The summed difference between z and <inline-formula><inline-graphic xlink:href="tmlimages\3-7401819x\3d3a7793-ad9a-4440-8756-46f6431713db.png" xlink:type="simple"/></inline-formula> served as the optimization function in the Solver Add-in. The difference between the actual and predicted values was calculated to be only 0.266, again supporting the validity of this method in predicting the ellipsoid shape. The sum squared difference was also calculated, giving a value of 0.00019, with the above mentioned parameters also lower than with the summed difference. However, it was decided that the summed difference would be preferable to the sum squared difference as anticipated outliers will lead to distortion of the model. Finally, the square roots of the calculated eigenvalues reproduce close to the expected axis lengths of 2 units with only a 2.96% average absolute error.</p><p>For the measured sample data set, the summed absolute difference between the measured and predicted values ranged from 364.52 to 1070.4 and the average absolute percent error was 20.478%. There are several considerations for the absolute percent error. First, the measured data is an irregular shape and is not a perfect hemi-ellipsoid. Second, while the overall shape may appear hemi-ellipsoid-like, outliers can affect the overall prediction of the model. We determined the values of the mound by eliminating low extreme values, but we did not eliminate high extreme values. Thus, it may be important in future applications to consider removal of these high peak values in order to focus on the values that best fit the shape of the hemi-ellipsoid.</p><p>Visualization of the data is an important validation method when testing modeling predictability, which allows interpretation of fit as well location of extreme differences and also verifies that the resulting model is actually ellipsoidal. The Add-in R Excel was used to give 3-D graphical representation, as shown in <xref ref-type="fig" rid="fig2">Figure 2</xref> below. Additionally, Matlab was used to create a hemi-ellipsoid shape that fit the actual data based on using triangle-based cubic interpolation of the given values. A 3-D representation of the ellipsoid, actual, and predicted data are shown in <xref ref-type="fig" rid="fig3">Figure 3</xref>.</p><p>To our knowledge, this is the first description of the ischial tuberosities being modeled as hemi-ellipsoids using the matrix equation of an ellipsoid with sum of least squares in a continuous fashion. This model allows for continuous monitoring of data over long periods of sitting time due to its automation.</p></sec><sec id="s5_2"><title>5.2. Limitations and Considerations</title><p>A major limitation of using a gradient descent method is that it is possible for local maxima or minima to be discovered that are not the true absolute maximum or minimum. In order to circumvent this, we created a loop allowed for different lower bound values for z to be assumed and it initiated the search in different points on the xy grid. We tuned the model to determine the best “center,” represented by a lower bound of “z”. Additionally, the assumption was made that the center of the ellipsoid was on the map. Thus, the parameter k was set equal to 0.</p><p>When automating, a trade-off has to be made between accuracy and computation time. Depending on the necessity for precision, a decreased stepping parameter may be desired to ensure the best possible fit occurs. The complexity of the problem and the running time for automation must be taken into consideration when deciding what step should be used and over what range of possible z lower bound values. For example, the running time from 0 to 150 with a step of 30 runs for 13.9 seconds while with a step of 15 runs for 38.8s. If multiple frames of data are collected per second over a period of several minutes to hours, the computation time increases to several hours.</p><p>A point of consideration when examining the results of the eigenvalues and eigenvectors is that Matrix.xla offered multiple means of calculating the eigen numbers. For example, the eigenvectors did not have to be assumed to be orthogonal with some methods. However, since we initially based our assumption of the <inline-formula><inline-graphic xlink:href="tmlimages\3-7401819x\f01a0e88-0ac8-4f81-a922-ae899b24a1e6.png" xlink:type="simple"/></inline-formula> matrix as being positive definite, we chose the Jacobi method that forced orthogonalization. Ultimately, we felt that in order for the results to be comprehensible, it was most logical to force the vectors to be orthogonal.</p><p>The method described allows for complex modeling of 3-D data by assuming a hemi-ellipsoid shape. While some of the assumptions and constraints force that data to fit a symmetrical shape, it allows for a means of comparison between constantly evolving shapes. This method is useful in showing trends over time and has a variety of applications in modeling systems with changing hemi-ellipsoid-like shapes.</p></sec></sec><sec id="s6"><title>Acknowledgements</title><p>A.B. would like to thank her faculty advisors and the Colleges of Engineering and Medicine at USF, as well as her patients, family, and Joshua M. Diggs.</p></sec><sec id="s7"><title>REFERENCES</title></sec></body><back><ref-list><title>References</title><ref id="scirp.42159-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">S. B. Pope, “Algorithms for Ellipsoids,” Cornell University Report FDA 08-01, 2008.</mixed-citation></ref><ref id="scirp.42159-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">D. A. Turner, I. J. Anderson, J. C. Mason and M. G. Cox, “An Algorithm for Fitting an Ellipsoid to Data,” 1999. http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.36.2773</mixed-citation></ref><ref id="scirp.42159-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">E. S. Maini, “Enhanced Direct Least Square Fitting of Ellipses,” International Journal of Pattern Recognition and Artificial Intelligence, Vol. 20, No. 6, 2006, pp. 939-953. http://dx.doi.org/10.1142/S021800140600506X</mixed-citation></ref><ref id="scirp.42159-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">I. Markovsky, A. Kukush and S. Van Huffel, “Consistent Least Squares Fitting of Ellipsoids,” Numerische Mathematik, Vol. 98, No. 1, 2004, pp. 177-194. http://dx.doi.org/10.1007/s00211-004-0526-9</mixed-citation></ref><ref id="scirp.42159-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">S. J. Ahn, “Least Squares Orthogonal Distance Fitting of Curves and Surfaces in Space,” Ph.D. Dissertation, University of Stuttgard, Stuttgard, 2004.</mixed-citation></ref><ref id="scirp.42159-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">A. Gefen, “Reswick and Rogers Pressure-Time Curve for Pressure Ulcer Risk. Part 1,” Nursing Standard, Vol. 23, No. 45, 2009, pp. 64-74. http://dx.doi.org/10.7748/ns2009.07.23.45.64.c7115</mixed-citation></ref><ref id="scirp.42159-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">S. Portnoy, N. Vuillerme, Y. Payan and A. Gefen, “Clinically Oriented Real-Time Monitoring of the Individual’s Risk for Deep Tissue Injury,” Medical &amp; Biological Engineering &amp; Computing, Vol. 49, No. 4, 2011, pp. 473-483.</mixed-citation></ref><ref id="scirp.42159-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">L. Agam and A. Gefen, “Toward Real-Time Detection of Deep Tissue Injury Risk in Wheelchair Users Using Hertz Contact Theory,” Journal of Rehabilitation Research and Development, Vol. 45, No. 4, 2008, pp. 537-550. http://dx.doi.org/10.1682/JRRD.2007.07.0114</mixed-citation></ref><ref id="scirp.42159-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">A. Gefen, “Bioengineering Models of Deep Tissue Injury,” Advances in Skin and Woundcare, Vol. 21, No. 1, 2008, pp. 30-36.http://dx.doi.org/10.1097/01.ASW.0000305403.89737.6c</mixed-citation></ref><ref id="scirp.42159-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">E. L. Ganz, N. Shabshin, Y. Itzchak and A. Gefen, “Assessment of Mechanical Conditions in Sub-Dermal Tissues during Sitting: A Combined Experimental-MRI and Finite Element Approach,” Journal of Biomechanics, Vol. 40, No. 7, 2007, pp. 14431454. http://dx.doi.org/10.1016/j.jbiomech.2006.06.020</mixed-citation></ref><ref id="scirp.42159-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">“Matrices and Linear Algebra,” Reference Guide for Matrix.xla, 2006. http://digidownload.libero.it/foxes/matrix/MatrixTutorial1.pdf</mixed-citation></ref></ref-list></back></article>