Click here to Skip to main content
15,896,526 members
Articles / Programming Languages / C# 4.0

Process Performance Determination in C# Part 3

Rate me:
Please Sign up or sign in to vote.
3.67/5 (2 votes)
11 Dec 2012CPOL4 min read 19.1K   159   13  
The program presented here provides a simple way to obtain process performance through Yield.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--------------------------------------------------------------------------->  
<!--                           INTRODUCTION                                

 The Code Project article submission template (HTML version)

Using this template will help us post your article sooner. To use, just 
follow the 3 easy steps below:
 
     1. Fill in the article description details
     2. Add links to your images and downloads
     3. Include the main article text

That's all there is to it! All formatting will be done by our submission
scripts and style sheets. 

-->  
<!--------------------------------------------------------------------------->  
<!--                        IGNORE THIS SECTION                            -->
<html>
<head>
<title>The Code Project</title>
<Style>
BODY, P, TD { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt }
H2,H3,H4,H5 { color: #ff9900; font-weight: bold; }
H2 { font-size: 13pt; }
H3 { font-size: 12pt; }
H4 { font-size: 10pt; color: black; }
PRE { BACKGROUND-COLOR: #FBEDBB; FONT-FAMILY: "Courier New", Courier, mono; WHITE-SPACE: pre; }
CODE { COLOR: #990000; FONT-FAMILY: "Courier New", Courier, mono; }
.style2 {
	border: 0px solid #000000;
	border-collapse: collapse;
}
.style3 {
	font-family: Verdana;
}
.style4 {
	background-color: #FBEDBB;
}
.style5 {
	border-style: solid;
	border-width: 1px;
}
</style>
<link rel="stylesheet" type="text/css" href="http://www.codeproject.com/App_Themes/Std/CodeProject.css">
</head>
<body color=#000000>
<!--------------------------------------------------------------------------->  


<!-------------------------------     STEP 1      --------------------------->
<!--  Fill in the details (CodeProject will reformat this section for you) -->

<pre>
Title:       Process Performance Determination in C#.NET Part 3 
Author:      Sitt Chee Keen
Email:       sitt@foundasoft.com
Language:    C# 4.0
Platform:    Windows
Technology:  
Level:       Beginner
Description: The program presented here provides a simple way to obtain process performance through Yield. 
Section      General Programming
SubSection   Algorithms &amp; Recipes
License:     <a href="http://www.codeproject.com/info/licenses.aspx">CPOL</a>
</pre>

<!-------------------------------     STEP 2      --------------------------->
<!--  Include download and sample image information.                       --> 

<ul class=download>
<li>
<a href="ProcessPerformance3.zip">Download source - 52 Kb</a></li>
</ul>


<!-------------------------------     STEP 3      --------------------------->

<!--  Add the article text. Please use simple formatting (<h2>, <p> etc)   -->

<h2><a name="Introduction">Introduction</a></h2>

<p>Process performance metrics are important to determine the performance 
capability (of a process) in terms of customer requirement. Process performance 
can be determined via the following ways: </p>
<ul>
	<li>&nbsp;Via DPMO (Defect per Million Opportunity) </li>
	<li>&nbsp;Via PPM (Part per Million)</li>
	<li>&nbsp;Via Yield</li>
	<li>&nbsp;Via Z-transformation </li>
</ul>
<p>This is the third of a four parts that determine the Process Performance.</p>
<p>For the first part (via DPMO), please see
<a href="http://www.codeproject.com/Articles/400588/Process-Performance-Determination-in-Csharp">
Process Performance Determination in C#</a>.</p>
<p>For the second part (via PPM), please see 
<a href="http://www.codeproject.com/Articles/403271/Process-Performance-Determination-in-Csharp-Part-2">
Process Performance Determination in C# Part 2</a>.</p>

<h2>Background</h2>

<p>This article describes how to determine the process performance from Yield. &nbsp; </p>
<p>The Yield metric is a measure of <strong>proportion of good unit</strong> in 
a process 
found by: </p>
<pre>Yield = Number of Good units / number of unit processed&nbsp;&nbsp;	(Equation 1)&nbsp;&nbsp; </pre>
<p>However there are some connection between </p>
<ul>
	<li>(i)Yield and DPO&nbsp;&nbsp;&nbsp; (see
	<a href="http://www.codeproject.com/Articles/400588/Process-Performance-Determination-in-Csharp">
	here</a> for explanation of DPO)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </li>
	<li>(ii)Yield and DPU&nbsp;&nbsp;&nbsp; (see
	<a href="http://www.codeproject.com/Articles/403271/Process-Performance-Determination-in-Csharp-Part-2">
	here</a> for explanation of DPU)&nbsp;&nbsp; </li>
</ul>
<p>Connection between Yield and DPO is shown as follow:</p>
<pre>Yield (from DPO) = 1 <span class="style3">−</span> &nbsp;DPO					(Equation 2)</pre>
<p>And connection between Yield and DPU (assume Poisson distribution) is shown 
as follow:</p>
<pre>Yield (from DPU) = exp(<span class="style3">−</span>DPU)					(Equation 3)</pre>
<p>Using the example in 
<a href="http://www.codeproject.com/Articles/400588/Process-Performance-Determination-in-Csharp">part 1</a> and 
<a href="http://www.codeproject.com/Articles/403271/Process-Performance-Determination-in-Csharp-Part-2">part 2</a>, a process produces 40,000 pencils. Three types of defects can occur. The number of occurrences of each defect 
type is: </p>
<ul>
	<li>&nbsp;Blurred printing: 36</li>
	<li>&nbsp;Too long: 118</li>
	<li>&nbsp;Rolled ends: 11</li>
</ul>
<p>&&nbsp;Total number of defects: 165</p>
<p>From the example above, DPO = 0.0006875 (see part 1), and DPU = 0.004125 (see 
part 2). Thus,</p>
<pre>Yield 		 = (40000 - 165) / 40000 = 0.995875
Yield (from DPO) = 1 - 0.0006875 	 = 0.999313
Yield (from DPU) = exp(-0.004125) 	 = 0.995883 	</pre>
<p>If we know the number of good units and number of units processed, we can 
calculate Yield using Equation 1. In the case where number of good parts cannot 
be determined, but DPO is known, we can calculate Yield using Equation 2.</p>
<h5>Rolled Throughput Yield (RTY)</h5>
<p>The RTY metric represents the percentage of units of product passing defect 
free through an entire process. It is determined by the multiplying first-pass 
yields (FPY) from each sub-process of the total process as follows:</p>
<pre> Yield (RTY) = Yield (sub-process 1) x Yield (sub-process 2) x ... x Yield (sub-process n)
								(Equation 4)</pre>
<p>The concept of the RTY is illustrated by the following example, which depicts 
an overall process comprised of four sub-processes. Suppose the FPY of each 
sub-process is 0.95. Then, the RTY is computed as:</p>
<p>RTY = 0.95 x 0.95 x 0.95 x 0.95 = 0.81 or 81%</p>
<p>Although individual sub-process yields are relatively high, the total process 
yield has dropped significantly. A significant advantage of using the RTY metric 
is that it provides a more complete view of the process. Sub-process yields that 
run high aren’t likely to garner the attention necessary to drive improvement. 
Often, it is only when the total process yield becomes visible does real action 
occur.</p>
<p>The code shown in this article provides calculation of Yield (as proportion 
of good units), Yield (from DPO) and Yield (from DPU). They can be seen as each 
FPY in Equation 4.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>

<h2>Requirement</h2>
<p>To run the code, you need to have the following:
<ul>
	<li>.NET Framework 2.0 and above</li>
	<li>Microsoft Visual Studio 2005 if you want to open the project files 
	included in the download project</li>
	<li>Nunit 2.4 if you want to run the unit tests included in the 
	download project </li>
</ul>

<h2>Using the code</h2>

<p>We envisage that the user will perform the following code to get the desired 
results. This involves a simple 4-steps process:</p>
<ol>
	<li>Instantiate a ProcessPerformanceFrYield object</li>
	<li>Input (i)NumOfUnitProcessed and NumOfGoodUnits, or (ii)DPO, or 
	(iii)DPU </li>
	<li>Invoke its .Analyze() method
	<li>Retrieve results from its .Result object.</li>
</ol>
<p>&nbsp;Here are some typical user’s code: </p>

<pre lang="cs">
//Yield (as proportion of good units)
ProcessPerformanceFr<span lang="en-us">Yield</span> <span lang="en-us">y</span> = new ProcessPerformanceFr<span lang="en-us">Yield</span>();
<span lang="en-us">y</span>.NumOfUnitProcessed = 40000;
<span lang="en-us">y</span>.NumOf<span lang="en-us">GoodUnits</span> = <span lang="en-us">3<span class="style4">9835</span></span>;
<span lang="en-us">y</span>.Analyze();
Console.WriteLine(&quot;<span lang="en-us">Y<span class="style4">ield</span></span> is: " + <span lang="en-us">y</span>.Result.<span lang="en-us">Yield</span>);
Console.WriteLine("Yield in % is: " + <span lang="en-us">y</span>.Result.YieldInPercent);
Console.WriteLine("Non conforming in % is: " + y.Result.NonConformingPercent);</pre>

<pre lang="cs">
//Yield (<span lang="en-us">f<span class="style4">rom</span></span> <span lang="en-us">D<span class="style4">PO</span></span>)
ProcessPerformanceFr<span lang="en-us">Yield</span> <span lang="en-us">yFrDPO</span> = new ProcessPerformanceFr<span lang="en-us">Yield</span>();
<span lang="en-us">yFrDPO</span>.<span lang="en-us">DPO</span> = <span lang="en-us">0<span class="style4">.0006875</span></span>;
<span lang="en-us">yFrDPO</span>.Analyze();
Console.WriteLine(&quot;<span lang="en-us">Y<span class="style4">ield (fr DPO)</span></span> is: " + <span lang="en-us">yFrDPO</span>.Result.<span lang="en-us">YieldFrDPO</span>);</pre>

<pre lang="cs">
//Yield (<span lang="en-us">f<span class="style4">rom</span></span> <span lang="en-us">D<span class="style4">PU</span></span>)
ProcessPerformanceFr<span lang="en-us">Yield</span> <span lang="en-us">yFrDPU</span> = new ProcessPerformanceFr<span lang="en-us">Yield</span>();
<span lang="en-us">yFrDPU</span>.<span lang="en-us">DPU</span> = <span lang="en-us">0<span class="style4">.004125</span></span>;
<span lang="en-us">yFrDPU</span>.Analyze();
Console.WriteLine(&quot;<span lang="en-us">Y<span class="style4">ield (fr DPU)</span></span> is: " + <span lang="en-us">yFrDPU</span>.Result.<span lang="en-us">YieldFrDP</span><span lang="en-us">U</span>);</pre>
<p>Two classes are implemented:</p>
<ol>
	<li>&nbsp;ProcessPerformanceFrYieldResult</li>
	<li>&nbsp;ProcessPerformanceFrYield</li>
</ol>
<p>ProcessPerformanceFrYieldResult is a class from which a result object derives, 
which holds the analysis results. In our implementation, the .Result member 
variable is defined as follows:</p>
<pre>     /// &lt;summary&gt;
    /// Process Performance from Yield Result class
    /// &lt;/summary&gt;
    public class ProcessPerformanceFrYieldResult
    {
        /// &lt;summary&gt;
        /// Default constructor
        /// &lt;/summary&gt;
        public ProcessPerformanceFrYieldResult() { }
        /// &lt;summary&gt;
        /// Non conforming percent
        /// &lt;/summary&gt;
        public double NonConformingPercent;
        /// &lt;summary&gt;
        /// Yield in Percent
        /// &lt;/summary&gt;
        public double YieldInPercent;
        /// &lt;summary&gt;
        /// Yield (not in Percent)
        /// &lt;/summary&gt;
        public double Yield;
        /// &lt;summary&gt;
        /// Yield from DPU
        /// &lt;/summary&gt;
        public double YieldFrDPU;
        /// &lt;summary&gt;
        /// Yield from DPO
        /// &lt;/summary&gt;
        public double YieldFrDPO;
    }</pre>

<p>The following table lists the available results, assuming that the ProcessPerformanceFrYield 
object name you use are y (for Yield as proportion of good units), yFrDPO (for 
Yield fr DPO) and yFrDPU (for Yield fr DPU): </p>
<table class="style2" style="width: 100%">
	<tr>
		<td style="width: 376px" class="style5"><strong>Result for Yield as 
		proportion of good units</strong></td>
		<td class="style5"><strong>Result stored in variable </strong> </td>
	</tr>
	<tr>
		<td style="width: 376px" class="style5">Yield </td>
		<td class="style5">y.Result.Yield </td>
	</tr>
	<tr>
		<td style="width: 376px" class="style5">Yield in %</td>
		<td class="style5">y.Result.YieldInPercent</td>
	</tr>
	<tr>
		<td style="width: 376px" class="style5">Non-conforming in %</td>
		<td class="style5">y.Result.NonConformingPercent</td>
	</tr>
	<tr>
		<td style="width: 376px" class="style5"><strong>Result for Yield from 
		DPO</strong></td>
		<td class="style5">&nbsp;</td>
	</tr>
	<tr>
		<td style="width: 376px" class="style5">Yield (fr DPO)</td>
		<td class="style5">yFrDPO.Result.YieldFrDPO</td>
	</tr>
	<tr>
		<td style="width: 376px" class="style5"><strong>Result for Yield from 
		DPU</strong></td>
		<td class="style5">&nbsp;</td>
	</tr>
	<tr>
		<td style="width: 376px" class="style5">Yield (fr DPU)</td>
		<td class="style5">yFrDPU.Result.YieldFrDPU</td>
	</tr>
</table>

<h2>ProcessPerformanceFrYield Class</h2>

<p>The ProcessPerformanceFrYield class does the analysis (calculation), and it is 
implemented as follows: </p>
<pre>     /// &lt;summary&gt;
    /// Determine Process Performance from Yield
    /// &lt;/summary&gt;
    public class ProcessPerformanceFrYield
    {
        private int N = 0;
        private int G = 0;
        private double dpu = 0;
        private double dpo = 0;
        private double yield = 0;
        private double yieldInPercent = 0;
        private double nonConformingInPercent = 0;
        
        /// &lt;summary&gt;
        /// ProcessPerformanceFrYield Result
        /// &lt;/summary&gt;
        public ProcessPerformanceFrYieldResult Result = new ProcessPerformanceFrYieldResult();

        #region Constructors
        /// &lt;summary&gt;
        /// Process Preformance from Yield default constructor
        /// &lt;/summary&gt;
        public ProcessPerformanceFrYield() { } // default empty constructor

        #endregion //  Constructors

        /// &lt;summary&gt;
        /// Write only property: total number of units
        /// &lt;/summary&gt;
        public int NumOfUnitProcessed
        {
            set { N = value; }
        }

        /// &lt;summary&gt;
        /// Write only property: total number of good units
        /// &lt;/summary&gt;
        public int NumOfGoodUnits
        {
            set { G = value; }
        }

        /// &lt;summary&gt;
        /// Write only property: DPU (defects per unit)
        /// &lt;/summary&gt;
        public double DPU
        {
            set { dpu = value; }
        }

        /// &lt;summary&gt;
        /// Write only property: DPO (defects per opportunity)
        /// &lt;/summary&gt;
        public double DPO
        {
            set { dpo = value; }
        }</pre>
<p>Once the ProcessPerformanceFrYield object is instantiated, the user needs to 
set input values as follows: </p>
<pre>//Yield: proportion of good units
ProcessPerformanceFrYield y = new ProcessPerformanceFrYield();
y.NumOfUnitProcessed = 40000;
y.NumOfGoodUnits = 39835;</pre>
<pre>//Yield from DPO
ProcessPerformanceFrYield yFrDPO = new ProcessPerformanceFrYield();
yFrDPO.DPO = 0.0006875;</pre>
<pre>//Yield from DPU
ProcessPerformanceFrYield yFrDPU = new ProcessPerformanceFrYield();
yFrDPU.DPU = 0.004125;</pre>
<p>Then the .Analyze() method is called to perform the analysis. Subsequently, 
the user can retrieve the analysis results from the .Result object in the 
ProcessPerformanceFrYield object. &nbsp; </p>
<p>The Analyze() method is implemented as follows:</p>
<pre>         /// &lt;summary&gt;
        /// Calculate the Process Performance from Yield
        /// &lt;/summary&gt;
        public void Analyze()
        {
            yield = (double)G / N;
            yieldInPercent = (double)G / N * 100;
            nonConformingInPercent = 100 - yieldInPercent;
            //Result
            Result.Yield = yield;
            Result.YieldInPercent = yieldInPercent;
            Result.NonConformingPercent = nonConformingInPercent;
            Result.YieldFrDPU = Math.Exp(-1 * dpu);
            Result.YieldFrDPO = 1 - dpo;
        }</pre>
<h2>Conclusion</h2>
<p>The program presented here provides a simple way to obtain process 
performance through Yield. Among all four process performance metrics mentioned 
in <a href="#Introduction">Introduction</a> in this page, Yield is the most 
commonly used performance metric as it is understood by technical and non 
technical personnel. I personally feel the difference between Yield (in a 
sub-process) and RTY (Rolled Throughput Yield) should be clarify for better 
communication in term of &quot;yield&quot;. Hope you enjoy reading this.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>

<h2>History</h2>
<p>15th June 2012: Initial post</p>

<!-------------------------------    That's it!   --------------------------->
</body>

</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Foundasoft.com
Malaysia Malaysia
Consultant

Comments and Discussions