Differential Corrector

Feature Spec and Test Procedures

Lead:  Steve C

Developer:  Darrel

STE/GUI Tester:  Tom

 

Explore

Failing Tests

Other Findings

Requirements

Interface/Functional Spec

Overview

Description

Fields

GUI

Remarks

Examples

Test Procedures

Assumptions

Existing Tests

Recommended Additional Tests

Appendix A - Miscellaneous Data

NOTES

 

Explore

 

Known bugs/issues committed in JIRA against this feature:

 

JIRA ID

Summary

Comment

GMT-2295

Different default naming conventions for DifferentialCorrector

P3 bug.  No action required. 

 

 

 

Note that GMT-2636 is the Differential Corrector QA task (not a bug).  

 

Failing Tests

Run Identification:  [Gmat-buildtest] Test results: 2012-10-17 (Win7-64/GMAT-32/M2010a/VS)

 

These tests run to completion but fail:

 

                          DC_ReportFile_Verbose (script) [#10 failed]

                          DC_ReportFile_Concise (script) [#10 failed]

                          DC_ReportFile_Debug (script) [#10 failed]

 

 

                          DC_ReportFile_Normal (script) [#10 failed]

Comments/Action Taken

      Output from GMAT run (11/15 build)

              Running mission...

********************************************************

*** Performing Differential Correction (using "DC1")

*** 3 variables; 3 goals

Variables: DefaultIB.Element1, DefaultIB.Element2, DefaultIB.Element3

Goals: DefaultIB.Element1, DefaultIB.Element2, DefaultIB.Element3

SolverMode: Solve

********************************************************

DC1 Iteration 1; Nominal Pass

Variables: DefaultIB.Element1 = 0; targeter scaled value: 0, DefaultIB.Element2 = 0; targeter scaled value: 0, DefaultIB.Element3 = 0; targeter scaled value: 0

Goals and achieved values:

DefaultIB.Element1 Desired: 5 Achieved: 0 Variance: 5

DefaultIB.Element2 Desired: 5 Achieved: 0 Variance: 5

DefaultIB.Element3 Desired: 5 Achieved: 0 Variance: 5

Completed iteration 1, pert 1 (DefaultIB.Element1 = 0.001; targeter scaled value: 0.001)

Completed iteration 1, pert 2 (DefaultIB.Element2 = 0.001; targeter scaled value: 0.001)

Completed iteration 1, pert 3 (DefaultIB.Element3 = 0.001; targeter scaled value: 0.001)

DC1 Iteration 2; Nominal Pass

Variables: DefaultIB.Element1 = 5; targeter scaled value: 5, DefaultIB.Element2 = 5; targeter scaled value: 5, DefaultIB.Element3 = 5; targeter scaled value: 5

Goals and achieved values:

DefaultIB.Element1 Desired: 5 Achieved: 5 Variance: 0

DefaultIB.Element2 Desired: 5 Achieved: 5 Variance: 0

DefaultIB.Element3 Desired: 5 Achieved: 5 Variance: 0

 

*** Targeting Completed in 2 iterations.

*** The Targeter converged!

Final Variable values:

DefaultIB.Element1 = 5

DefaultIB.Element2 = 5

DefaultIB.Element3 = 5

Mission run completed.

===> Total Run Time: 3.666000 seconds

========================================

 

     Test type is TextComparator.  Truth File below

Iteration 1

Variables:

DefaultIB.Element1 = 0

DefaultIB.Element2 = 0

DefaultIB.Element3 = 0

Goals and achieved values:

DefaultIB.Element1 Desired: 5 Achieved: 0

DefaultIB.Element2 Desired: 5 Achieved: 0

DefaultIB.Element3 Desired: 5 Achieved: 0

New variable estimates:

DefaultIB.Element1 = 5

DefaultIB.Element2 = 5

DefaultIB.Element3 = 5

Iteration 2

DefaultIB.Element1 = 5

DefaultIB.Element2 = 5

DefaultIB.Element3 = 5

DefaultIB.Element1 Desired: 5 Achieved: 5

DefaultIB.Element2 Desired: 5 Achieved: 5

DefaultIB.Element3 Desired: 5 Achieved: 5

 

 

The actual GMAT run does not contain the items in red.  Per discussion with Steve H on 11/16/12, it is OK to remove these four lines from the truth file.  All four tests above now pass. 

 

Other Findings

 

1          

Requirements

These are working requirements.  They are included here for review and convenience purposes.  After review, requirements are maintained in the formal SRS located at SourceForge in /trunk/doc/SystemDocs/Requirements. 

 

ID

Requirement

FRR-19.1.0

The system shall allow the user to create and configure a differential corrector with the following properties:

FRR-19.1.1

1)                 Maximum iterations

FRR-19.1.2.0

2)                 Derivative Method

FRR-19.1.2.1

                   i.       Forward difference

FRR-19.1.2.2

                    ii.       Central difference

FRR-19.1.2.3

                     iii.       Backward difference

FRR-19.2.0

The system shall optionally show progress of the differential corrector in the message window that includes:

FRR-19.2.1

1)                 Current value of control variables

FRR-19.2.2

2)                 Achieved and desired target variables

FRR-19.2.3

3)                 Iteration number

FRR-19.3

The system shall optionally create a report file containing information on each iteration of the differential corrector containing all data listed in FRR-19.2.

 

Interface/Functional Spec

Overview

A differential corrector used to refine a set of variable parameters in order to meet a set of goals defined for the modeled mission.

Description

 

A differential corrector (DC) is a numerical solver for solving boundary value problems. The DC in GMAT uses a simple shooting method where the derivatives are determined using finite differencing. In the mission sequence, you use the differential corrector object in a Target control sequence to solve the boundary value problem. In GMAT, differential correctors are often used to determine the maneuver components required to achieve desired orbital conditions, say, B-plane conditions at a planetary flyby.

 

You must create and configure a differential corrector object for your application by setting numerical properties of the solver such as the maximum number of allowed iterations and choice of derivative method used to calculate the finite differences. You can also select among different output options that show increasing levels of information for each differential corrector iteration.

 

See Also: Target, Vary, and Achieve.

Fields

See the User Interface Spec spreadsheet for reference information for fields.  

GUI

 

The Differential Corrector dialog box allows you to specify properties of a Differential Corrector such as maximum iterations, choice of derivative method used to calculate the finite differences, and choice of reporting options. 

 

 

To create a Differential Corrector object, navigate to the Resources tree, expand the Solvers folder, right-click on the Boundary Value Solvers folder, point to Add , and click DifferentialCorrector .  A resource named DC1 will be created.  Double-click on the DC1 resource to bring up the following Differential Corrector dialog box.

 

 

Remarks

Object and Command Interactions

 

The DifferentialCorrector object can only be used in the context of targeting-type commands. Please see the documentation for Target , Vary , and Achieve for more information and worked examples.

Examples

 

Create a Differential Corrector object. 

Create DifferentialCorrector DC1;

GMAT DC1.ShowProgress = true;

GMAT DC1.ReportStyle = Normal;

GMAT DC1.ReportFile = 'DifferentialCorrectorDC1.data';

GMAT DC1.MaximumIterations = 25;

GMAT DC1.DerivativeMethod = ForwardDifference;

 

BeginMissionSequence

 

To see how the differential corrector object is used in conjunction with Target, Vary , and Achieve commands to solve orbit problems, see the Target command examples. 

Test Procedures

Assumptions

None.

Existing Tests

There are 39 files of the form *.tc. 

 

Test Name

Description

DC_*.TC

 

There are 14 files of this type.  (2 of the 14 are of the form DC_Validation*.TC)

DifferentialCorrector_Validation*.TC

 

Validation type tests.  There are 25 tests of this type. 

 

 

According to the table above, there are

14 + 25 = 39

files accounted for which agrees with the known number of test cases. 

Recommended Additional Tests

1          

 

Unique Validation

Test Name

Summary

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Appendix A - Miscellaneous Data

Note that this data is primarily for the internal use of the feature lead.  It does not need to be reviewed by the SDE and STE.  

 

NOTES

 

1         xx