User:Kate Racaza/test page: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 43: Line 43:
  {{APIPrefix|Module}} Module1
  {{APIPrefix|Module}} Module1
     {{APIPrefix|Sub}} Main()
     {{APIPrefix|Sub}} Main()
  {{APIComment|'Declare a new ALTADataSet object.}}
    {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
    
    
   {{APIComment|'Declare a new stress profile and define its segments.}}  
   {{APIComment|'Declare a new stress profile and define its segments.}}  
Line 55: Line 52:
     sp.RepeatCycle = False
     sp.RepeatCycle = False
   
   
   {{APIComment|'Use the logarithmic (power LSR) stress transformation.}}
   {{APIComment|'Declare a new ALTADataSet object.}}  
  {{APIComment|'Use stress level = 100.}}  
    {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
    ADS.AddStressDefinition({{APIString|"Stress1"}}, ALTASolverLSR.Power, 100)
   
   
   {{APIComment|'Assign the stress profile to the data set.}}  
   {{APIComment|'Assign the stress profile to the data set.}}  
     ADS.AddStressProfile(sp)
     ADS.AddStressProfile(sp)
   
   
  {{APIComment|'The stress profile uses the logarithmic (power LSR) stress transformation}}
  {{APIComment|'and has a use stress level = 100.}}
    ADS.AddStressDefinition({{APIString|"Stress1"}}, ALTASolverLSR.Power, 100)
 
   {{APIComment|'Add the failure times to the data set.}}
   {{APIComment|'Add the failure times to the data set.}}
     ADS.AddFailure(252, 1, sp)
     ADS.AddFailure(252, 1, sp)
Line 95: Line 95:
==Discussion==
==Discussion==


The [[ALTADataSet Class|ALTADataSet]] class represents an ALTA standard folio data sheet. The class contains all the methods and properties that allow you to define a data set and fit a life-stress relationship and distribution to the data.
The [[ALTAStressProfile_Class|ALTAStressProfile]] class represents a time-dependent stress profile. In this example, the stresses are increased in a stepwise fashion. The <code>RepeatCycle</code> property is set to False, indicating that all times after the last segment will use the stress value defined in the last segment.
 
{{APIComment|'Declare a new stress profile and define its segments.}}
  {{APIPrefix|Dim}} sp {{APIPrefix|As New}} ALTAStressProfile
  sp.AddSegment(200, 125)
  sp.AddSegment(300, 175)
  sp.AddSegment(350, 200)
  sp.AddSegment(375, 250)
  sp.RepeatCycle = False
 
Next, we create an ALTA data set by declaring a new [[ALTADataSet Class|ALTADataSet]] object, and then using the [[ALTADataSet.AddStressProfile|AddStressProfile]] method to associate the stress profile with the object.  


  {{APIComment|'Declare a new ALTADataSet object.}}  
  {{APIComment|'Declare a new ALTADataSet object.}}  
   {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
   {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
 
{{APIComment|'Assign the stress profile to the data set.}}
  ADS.AddStressProfile(sp)


Use the [[ALTADataSet.AddStressDefinition|AddStressDefinition]] method to define a stress type and the use stress level.  
Use the [[ALTADataSet.AddStressDefinition|AddStressDefinition]] to define the stress transformation and use stress level of the stress profile.


  {{APIComment|'Define a stress type with use stress level &#61; 300.}}  
  {{APIComment|'The stress profile uses the logarithmic (power LSR) stress transformation}}
   ADS.AddStressDefinition({{APIString|"Stress1"}},,300)
{{APIComment|'and has a use stress level &#61; 100.}}  
   ADS.AddStressDefinition({{APIString|"Stress1"}}, ALTASolverLSR.Power, 100)


The data set can contain failures, suspensions or interval data. The following example shows how to use the [[ALTADataSet.AddFailure|AddFailure]] method to define failures and the [[ALTADataSet.AddSuspension|AddSuspension]] method to define suspensions.  
The data set can contain failures, suspensions or interval data. The following example shows how to use the [[ALTADataSet.AddFailure|AddFailure]] method and [[ALTADataSet.AddSuspension|AddSuspension]] method to add the stress profile to the data points.  


  {{APIComment|'Add failure times to the data set.}}
  {{APIComment|'Add the failure times to the data set.}}
   ADS.AddFailure(245, 1, 353)
   ADS.AddFailure(252, 1, sp)
  ADS.AddFailure(110, 1, 373)
   ADS.AddFailure(280, 1, sp)
  ADS.AddFailure(180, 1, 373)
   ADS.AddFailure(320, 1, sp)
   ADS.AddFailure(200, 1, 373)
   ADS.AddFailure(335, 1, sp)
   ADS.AddFailure(50, 1, 393)
   ADS.AddFailure(354, 1, sp)
   ADS.AddFailure(70, 1, 393)
   ADS.AddFailure(361, 1, sp)
   ADS.AddFailure(88, 1, 393)
   ADS.AddFailure(362, 1, sp)
   ADS.AddFailure(112, 1, 393)
   ADS.AddFailure(368, 1, sp)
   ADS.AddFailure(140, 1, 393)
   
   ADS.AddFailure(160, 1, 393)
  {{APIComment|'Add the suspensions to the data set.}}
   
   ADS.AddSuspension(328, 1, sp)   
  {{APIComment|'Add suspensions to the data set.}}
   ADS.AddSuspension(375, 3, sp)  
   ADS.AddSuspension(250, 5, 353)   
   ADS.AddSuspension(250, 3, 373)  


The AnalysisSetting property returns an [[ALTAAnalysisOptions Class|ALTAAnalysisOptions]] object, which represents the analysis settings of the ALTADataSet object. In the following example, we use the <code>ModelType</code> and <code>Distribution</code> properties of the ALTAAnalysisOptions class to specify the life-stress relationship and distribution.
The AnalysisSetting property returns an [[ALTAAnalysisOptions Class|ALTAAnalysisOptions]] object, which represents the analysis settings of the ALTADataSet object. In the following example, we use the <code>ModelType</code> and <code>Distribution</code> properties of the ALTAAnalysisOptions class to specify the life-stress relationship and distribution.


  {{APIComment|'Use the Arrhenius-Weibull model to analyze the data set.}}
  {{APIComment|'Use the cumulative damage - Weibull model to analyze the data set.}}
  {{APIComment|'Keep all other analysis settings at default.}}
  {{APIComment|'Keep all other analysis settings at default.}}
   ADS.AnalysisSettings.ModelType = ALTASolverModel.Arrhenius
   ADS.AnalysisSettings.ModelType = ALTASolverModel.CumDamage
   ADS.AnalysisSettings.Distribution = ALTASolverDistribution.Weibull
   ADS.AnalysisSettings.Distribution = ALTASolverDistribution.Weibull


To analyze the data set, use the [[ALTADataSet.Calculate|Calculate]] method. The method returns a message box that shows the estimated parameters of the model, based on the settings specified in the AnalysisSettings property.  
Use the [[ALTADataSet.Calculate|Calculate]] method to analyze the data set. The method returns a message box that shows the estimated parameters of the model, based on the settings specified in the AnalysisSettings property.  


  {{APIComment|'Analyze the data set.}}
  {{APIComment|'Analyze the data set.}}
   ADS.Calculate()
   ADS.Calculate()


The FittedModel property gets a [[CModel Class|cModel]] object that represents the fitted model of the accelerated life testing data analysis. From the model, you can calculate useful metrics such as reliability, failure rate, mean time, etc. In this example, we calculate for the B10 life.
The FittedModel property gets a [[CModel Class|cModel]] object that represents the fitted model of the analysis. From the model, you can calculate useful metrics such as reliability, failure rate, mean time, etc. In this example, we use the [[CModel.Time|cModel.Time]] method to calculate for the B1 life.


  {{APIComment|'Calculate the B10 life and display the result.}}
  {{APIComment|'Calculate the B1 life and display the result.}}
   {{APIPrefix|Dim}} r {{APIPrefix|As}} Double
   {{APIPrefix|Dim}} r {{APIPrefix|As}} Double
   r = ADS.FittedModel.Time(.90)
   r = ADS.FittedModel.Time(.99)
   MsgBox({{APIString|"B10 Life: "}} & r)
   MsgBox({{APIString|"B1 Life: "}} & r)




==Notes==
==Notes==
For analyses that require a two-stress model, you will need to define two stress types, and then use the overloaded methods to add the data points. For example:
For analyses that require multiple stress profiles, the number of stress types must be equal to the number of stress profiles used in the analysis. For example:


{{APIComment|'Define two stress profiles.}}
  {{APIPrefix|Dim}} SP1 {{APIPrefix|As New}} ALTAStressProfile
  {{APIPrefix|Dim}} SP2 {{APIPrefix|As New}} ALTAStressProfile
  {{APIComment|...}}
  {{APIComment|...}}
{{APIComment|'Define two stress types.}}
  ADS.AddStressDefinition({{APIString|"Temp"}},,328)
  ADS.AddStressDefinition({{APIString|"Voltage"}},,2)
   
   
  {{APIComment|'Add failure times for Temp &#61; 348 and Voltage &#61; 3.}}
{{APIComment|'Assign the stress profiles to a data set.}}
   ADS.AddFailure(620, 1, 348, 3)
  {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
   ADS.AddFailure(632, 1, 348, 3)
  ADS.AddStressProfile(SP1)
  ADS.AddStressProfile(SP2)
{{APIComment|'Define the stress transformations and use stress levels.}}
  ADS.AddStressDefinition({{APIString|"Stress1"}}, ALTASolverLSR.Arrhenius, 100)
  ADS.AddStressDefinition({{APIString|"Stress2"}}, ALTASolverLSR.Power, 4)
 
You can then use the overloaded methods to add the stress profiles to the data points:
{{APIComment|...}}
  {{APIComment|'Add failure times.}}
   ADS.AddFailure(171, 1, SP1, SP2)
   ADS.AddFailure(174, 1, SP1, SP2)
  {{APIComment|...}}
  {{APIComment|...}}


===References===
===References===
*[[ALTAStressProfile Class]]
*[[ALTADataSet Class]]
*[[ALTADataSet Class]]
*[[ALTADataSet.AddStressProfile|ALTADataSet.AddStressProfile Method]]
*[[ALTADataSet.AddStressDefinition|AddStressDefinition Method]]
*[[ALTADataSet.AddStressDefinition|AddStressDefinition Method]]
*[[ALTADataSet.AddFailure|ALTADataSet.AddFailure Method]]
*[[ALTADataSet.AddFailure|ALTADataSet.AddFailure Method]]

Revision as of 18:55, 12 May 2016

DRAFT

APIWiki.png


<< Back to Tutorials Main Page

If you have ALTA PRO, you can use the Synthesis API to analyze a data set with time-dependent stress profiles. In this tutorial, you will learn how to define stress profiles, analyze a data set, and obtain analysis results from the model.


Tutorial: Accelerated Life Testing Data Analysis - Stress Profiles

The following example demonstrates how to define a single stress profile for an ALTA data set and use the analysis results to obtain the B1 life (i.e., time at which reliability is equal to 99%). A discussion of the example follows.

The data sets used in this example are:

Stress Profile
Start End Stress
0 200 125
200 300 175
300 350 200
350 375 250
Data Set
Number in State State Time to F or S Number in State State Time to F or S
1 F 252 1 F 354
1 F 280 1 F 361
1 F 320 1 F 362
1 S 328 1 F 368
1 F 335 3 S 375
VB.NET

Imports SynthesisAPI 

Module Module1
   Sub Main()
 
  'Declare a new stress profile and define its segments.  
   Dim sp As New ALTAStressProfile
   sp.AddSegment(200, 125) 
   sp.AddSegment(300, 175)
   sp.AddSegment(350, 200)
   sp.AddSegment(375, 250)
   sp.RepeatCycle = False

  'Declare a new ALTADataSet object.  
   Dim ADS As New ALTADataSet

  'Assign the stress profile to the data set.  
   ADS.AddStressProfile(sp)

  'The stress profile uses the logarithmic (power LSR) stress transformation 
  'and has a use stress level = 100.  
   ADS.AddStressDefinition("Stress1", ALTASolverLSR.Power, 100)
 
  'Add the failure times to the data set. 
   ADS.AddFailure(252, 1, sp)
   ADS.AddFailure(280, 1, sp)
   ADS.AddFailure(320, 1, sp)
   ADS.AddFailure(335, 1, sp)
   ADS.AddFailure(354, 1, sp)
   ADS.AddFailure(361, 1, sp)
   ADS.AddFailure(362, 1, sp)
   ADS.AddFailure(368, 1, sp)
   
  'Add the suspensions to the data set. 
   ADS.AddSuspension(328, 1, sp)   
   ADS.AddSuspension(375, 3, sp) 
 
  'Use the cumulative damage - Weibull model to analyze the data set. 
  'Keep all other analysis settings at default. 
   ADS.AnalysisSettings.ModelType = ALTASolverModel.CumDamage
   ADS.AnalysisSettings.Distribution = ALTASolverDistribution.Weibull
 
  'Analyze the data set. 
   ADS.Calculate()

  'Calculate the B1 life and display the result. 
   Dim r As Double
   r = ADS.FittedModel.Time(.99)
   MsgBox("B1 Life: " & r)

   End Sub
End Module


Discussion

The ALTAStressProfile class represents a time-dependent stress profile. In this example, the stresses are increased in a stepwise fashion. The RepeatCycle property is set to False, indicating that all times after the last segment will use the stress value defined in the last segment.

 'Declare a new stress profile and define its segments.  
  Dim sp As New ALTAStressProfile
  sp.AddSegment(200, 125) 
  sp.AddSegment(300, 175)
  sp.AddSegment(350, 200)
  sp.AddSegment(375, 250)
  sp.RepeatCycle = False

Next, we create an ALTA data set by declaring a new ALTADataSet object, and then using the AddStressProfile method to associate the stress profile with the object.

 'Declare a new ALTADataSet object.  
  Dim ADS As New ALTADataSet
 
 'Assign the stress profile to the data set.  
  ADS.AddStressProfile(sp)

Use the AddStressDefinition to define the stress transformation and use stress level of the stress profile.

 'The stress profile uses the logarithmic (power LSR) stress transformation 
 'and has a use stress level = 100.  
  ADS.AddStressDefinition("Stress1", ALTASolverLSR.Power, 100)

The data set can contain failures, suspensions or interval data. The following example shows how to use the AddFailure method and AddSuspension method to add the stress profile to the data points.

 'Add the failure times to the data set. 
  ADS.AddFailure(252, 1, sp)
  ADS.AddFailure(280, 1, sp)
  ADS.AddFailure(320, 1, sp)
  ADS.AddFailure(335, 1, sp)
  ADS.AddFailure(354, 1, sp)
  ADS.AddFailure(361, 1, sp)
  ADS.AddFailure(362, 1, sp)
  ADS.AddFailure(368, 1, sp)
    
 'Add the suspensions to the data set. 
  ADS.AddSuspension(328, 1, sp)   
  ADS.AddSuspension(375, 3, sp) 

The AnalysisSetting property returns an ALTAAnalysisOptions object, which represents the analysis settings of the ALTADataSet object. In the following example, we use the ModelType and Distribution properties of the ALTAAnalysisOptions class to specify the life-stress relationship and distribution.

 'Use the cumulative damage - Weibull model to analyze the data set. 
 'Keep all other analysis settings at default. 
  ADS.AnalysisSettings.ModelType = ALTASolverModel.CumDamage
  ADS.AnalysisSettings.Distribution = ALTASolverDistribution.Weibull

Use the Calculate method to analyze the data set. The method returns a message box that shows the estimated parameters of the model, based on the settings specified in the AnalysisSettings property.

 'Analyze the data set. 
  ADS.Calculate()

The FittedModel property gets a cModel object that represents the fitted model of the analysis. From the model, you can calculate useful metrics such as reliability, failure rate, mean time, etc. In this example, we use the cModel.Time method to calculate for the B1 life.

 'Calculate the B1 life and display the result. 
  Dim r As Double
  r = ADS.FittedModel.Time(.99)
  MsgBox("B1 Life: " & r)


Notes

For analyses that require multiple stress profiles, the number of stress types must be equal to the number of stress profiles used in the analysis. For example:

 'Define two stress profiles.  
  Dim SP1 As New ALTAStressProfile
  Dim SP2 As New ALTAStressProfile
 ... 

 'Assign the stress profiles to a data set.  
  Dim ADS As New ALTADataSet
  ADS.AddStressProfile(SP1)
  ADS.AddStressProfile(SP2)

 'Define the stress transformations and use stress levels.  
  ADS.AddStressDefinition("Stress1", ALTASolverLSR.Arrhenius, 100)
  ADS.AddStressDefinition("Stress2", ALTASolverLSR.Power, 4)

You can then use the overloaded methods to add the stress profiles to the data points:

 ... 
 'Add failure times. 
  ADS.AddFailure(171, 1, SP1, SP2)
  ADS.AddFailure(174, 1, SP1, SP2)
 ... 

References