Variance function

93 views
Skip to first unread message

aviation76

unread,
Nov 3, 2011, 3:25:31 PM11/3/11
to ia...@googlegroups.com

Hello,

I would like to utilize the VARIANCE function to create a display that will notify the test director when the certain set of parameters are stable and the aircraft is ready to take a record.

Let's take airspeed, for example. Reviewing the IADS help document:

DidPilotHoldAirpeedSteadyForLastNSeconds = Variance(Param, GetUpdateRate(Param)*Ns) < 0.1 ? TRUE : FALSE Where Ns is the number of seconds  

The arbitrary value of "0.1" was designated as the threshold in the example.  Is that term interchangeable with tolerance?  For example, I am provided a tolerance that the airspeed should remain within (+/- 1.5 kt).  Shall I state the same equation as above (different value, of course) utilizing the same logical operator?  Or do I need two statements, one with the lower tolerance and the other with the upper tolerance?  The theory is that if the airspeed is not within this tolerance band, then we will not proceed with the test point. 
 

Thanks in advance for your help.

Adam Chant

unread,
Nov 3, 2011, 4:29:12 PM11/3/11
to ia...@googlegroups.com

That would be only for 1 condition or threshold, and tolerance would be for 2 conditions; the minimum and the maximum.

 

I think you can just add an && to the equation to get the range.

 

DidPilotHoldAirpeedSteadyForLastNSeconds = Variance(Param, GetUpdateRate(Param)*Ns) < 0.1 && Variance(Param, GetUpdateRate(Param)*Ns) < -0.1 ? TRUE : FALSE

 

 

Adam Chant

Symvionics, Inc.

IADS Application Engineer

(661) 273-7003 x 210

--
You received this message because you are subscribed to the Google Groups "IADS" group.
To view this discussion on the web visit https://groups.google.com/d/msg/iads/-/9Cn1cgM6ssgJ.
To post to this group, send email to ia...@googlegroups.com.
To unsubscribe from this group, send email to iads+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/iads?hl=en.

James Bretz

unread,
Nov 3, 2011, 4:35:43 PM11/3/11
to ia...@googlegroups.com
Well, I'm not exactly sure if you want to use the variance function in this
case.

The variance function is really a measure of how far the numbers are from
the 'mean' of the data.... to be exact, the sum of the squares of the
differences from the mean. The basis lies more in statistics than a given
exact tolerance.

If you want a more direct tolerance value, you should probably approach the
equation in this manner:

InRange( ActualAirspeed, ExpectedAirSpeed, 1.5 )

When this function returns 'true' (1), then the aircraft is within the
tolerance specified. You can use that derived parameter to color a panel,
led, background of a text value, etc.

If the plane needs to be within this range for a given amount of time, you
can then use the variance function with the needed time range and compare
that to '0.0'.

Hope this helps,
Jim


--------------------------------------------------
From: "Adam Chant" <ad...@iads-soft.com>
Sent: Thursday, November 03, 2011 1:29 PM
To: <ia...@googlegroups.com>
Subject: RE: [IADS] Variance function

aviation76

unread,
Nov 4, 2011, 8:14:10 AM11/4/11
to ia...@googlegroups.com, James Bretz

Thanks Adam and Jim for your response.

What I am trying to establish is a logic that will change the color of a panel to establish that the aircraft has been stable for a minimum of 5 seconds. 

Just to make sure I understand the ‘InRange’ function, it can be stated as:

InRange(param, value, deviation), where value is the value returned and deviation is my tolerance.  Is that correct?  Or is value a constant that I set?  If the latter is true…that is not what I require.  I just need the airspeed value to be stable for a given period, regardless of speed.

 

Thus I can set it up as:  StableAirspeed = InRange(param, value, 1.5)

If I wanted to include a time persistence in addition to the ‘InRange’ function

DidPilotHoldAirpeedSteadyForLast5Seconds = Variance(StableAirspeed,GetUpdateRate(StableAirspeed)*5.0) == 0.0 ? TRUE : FALSE

Thus when the aforementioned equation goes true, then my display will indicate that the aircraft has been stable for the last 5 seconds.

Am I on the right track?

Adam Chant

unread,
Nov 4, 2011, 11:49:40 AM11/4/11
to ia...@googlegroups.com

Value is the center of the deviation. So if you want 250 KNOTS with a deviation of 10 KNOTS it would look like this:

InRange(KIAS, 250, 10)

You can build a SineWave and use the Damping functions to debug this.

 

KIAS = SineWave(10,100,250,0,0.0125,10) This will start a sinewave at about +-350 and damp down to 250 (+-25) in 3 seconds and restart every 10 seconds.

 

 

Adam Chant

Symvionics, Inc.

IADS Application Engineer

(661) 273-7003 x 210

 

--

You received this message because you are subscribed to the Google Groups "IADS" group.

To view this discussion on the web visit https://groups.google.com/d/msg/iads/-/jVndoDk2_SMJ.

James Bretz

unread,
Nov 4, 2011, 12:08:51 PM11/4/11
to ia...@googlegroups.com

> Thus I can set it up as: *StableAirspeed* = InRange(param, value, 1.5)

Yep, it's as easy as that: InRange( ActualAirSpeed, DesiredAirSpeed,
Tolerance )

> If I wanted to include a time persistence in addition to the 'InRange'
> function
>

> DidPilotHoldAirpeedSteadyForLast5Seconds = Variance(*StableAirspeed*
> ,GetUpdateRate(*StableAirspeed*)*5.0) == 0.0 ? TRUE : FALSE


>
> Thus when the aforementioned equation goes true, then my display will
> indicate that the aircraft has been stable for the last 5 seconds.
>
> Am I on the right track?

Yes, exactly..
Jim


--------------------------------------------------
From: "Adam Chant" <ad...@iads-soft.com>

Sent: Friday, November 04, 2011 8:49 AM


To: <ia...@googlegroups.com>
Subject: RE: [IADS] Variance function

> Value is the center of the deviation. So if you want 250 KNOTS with a

> set? If the latter is true.that is not what I require. I just need the

aviation76

unread,
Nov 4, 2011, 1:10:47 PM11/4/11
to ia...@googlegroups.com, James Bretz
Thanks, guys.  Looks like there is no way around manually inserting a value for the "desired airspeed".  Is this statement true?  There are times when test points will utilize various airspeeds in a test and I would like to get away from hard coding a fixed value.  I would like the statement to go true when the oscillations for the current airspeed over time are small.
 
Thanks for your time helping me build this display:)

James Bretz

unread,
Nov 4, 2011, 1:33:30 PM11/4/11
to ia...@googlegroups.com
Sure, you can put anything you want in that field (GetConstant, GetValue
from a edit box or drop down, etc). You don't need to hardcode the values in
the equation. The most simple approach would be to add an "edit box" to you
window, and use the GetValue function to extract it... then just hand type
in the values when needed.


DesiredAirSpeed = GetValue( "EditBoxNameForAirspeed", "Value" )
AirSpeedTol = GetValue( "EditBoxNameForTolerance", "Value" )
StableAirspeed= InRange( AirSpeedParam, DesiredAirSpeed, AirSpeedTol )


DidPilotHoldAirpeedSteadyForLast5Seconds = Variance(*StableAirspeed*
,GetUpdateRate(*StableAirspeed*)*5.0) == 0.0 ? TRUE : FALSE

If you're using the TestPoint system already, you might want to tie it to
the GetTestPointInfoEx function. Using that function, you can preload a
matrix of arbitrary values (such as ExpectedAirSpeed/AirSpeedTolerance) and
have it return the value corresponding to the TestPointId set on the
dashboard.

For example:

GetTestPointInfoEx( "UserGroupOrDiscipline", "ColumnName",
ValueToReturnIfNotExists(string or num) )

DesiredAirSpeed = GetTestPointInfoEx( "FQ", "DesiredAirSpeed", 0 )
AirSpeedTol = GetTestPointInfoEx( "FQ", "AirSpeedTolerance", 1.5 )
StableAirspeed= InRange( AirSpeedParam, DesiredAirSpeed, AirSpeedTol )

DidPilotHoldAirpeedSteadyForLast5Seconds = Variance(*StableAirspeed*
,GetUpdateRate(*StableAirspeed*)*5.0) == 0.0 ? TRUE : FALSE

To do this, you must set up the PlannedTestPoint table as well as import
your table of values into a special table TestPointInfoEx using the
ConfigurationTool (Tools->Testpoint Import Wizard).

I know this a lot to swallow, so we'll help you along if you want to go this
route. If you want to read some background info, search the help for "Test
Point Import Wizard" and "TestPoint"
Jim

--------------------------------------------------
From: "aviation76" <z_a...@hotmail.com>
Sent: Friday, November 04, 2011 10:10 AM
To: <ia...@googlegroups.com>
Cc: "James Bretz" <j...@iads-soft.com>


Subject: Re: [IADS] Variance function

> Thanks, guys. Looks like there is no way around manually inserting a
> *value
> * for the "desired airspeed". Is this statement true? There are


> times when test points will utilize various airspeeds in a test and I
> would
> like to get away from hard coding a fixed value. I would like
> the statement to go true when the oscillations for the current airspeed
> over time are small.
>
> Thanks for your time helping me build this display:)
>

> --
> You received this message because you are subscribed to the Google Groups
> "IADS" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/iads/-/FOvQ0i67MC0J.

Adam Chant

unread,
Nov 4, 2011, 1:33:45 PM11/4/11
to ia...@googlegroups.com

Set your threshold airspeed to a constant. Say AirspeedCheck

 

Then use GetConstant(AirspeedCheck) in your equation to get the value of it.

 

You can either manually go in and change the airspeed in the constants table..

OR

Use a ActiveX Text input to populate the Constant with an Action Object.

 

There is a little bit of leg work to accomplish this, but it makes for a real nice user-input resource.

1.       Drop an Text Input object on the display.

2.       Drop and Action Object on the display

3.       Shift Drag from the Text Input to the Action Object and drop it to ActionArguement2. ( It will display TextInput1.Value in the Action properties)

4.       Set the ActionArguement property to AirspeedCheck (This is the name of the constant that will hold the value from your input)

5.       Set ActionType to SetConstant

6.       Create a derived equation Text2Change = GetValue(“TextInput1”, “Value”) (get the text input from the user value)

7.       Create a derived equation DidTextChange = Prev(Text2Change, 1) != Text2Change (check to see if the user changed the value)

8.       Drag DidTextChange to The Action Object ExecuteAction Property. (if it changes then update the constant table)

 

That will now take the value from the text input and populate it to the constants table.

Use the GetConstant(AirspeedCheck) in your equation for a dynamic  input and you are set.

 

Hope this helps.

 

 

Adam Chant

Symvionics, Inc.

IADS Application Engineer

(661) 273-7003 x 210

 

From: ia...@googlegroups.com [mailto:ia...@googlegroups.com] On Behalf Of aviation76
Sent: Friday, November 04, 2011 10:11 AM
To: ia...@googlegroups.com
Cc: James Bretz
Subject: Re: [IADS] Variance function

 

Thanks, guys.  Looks like there is no way around manually inserting a value for the "desired airspeed".  Is this statement true?  There are times when test points will utilize various airspeeds in a test and I would like to get away from hard coding a fixed value.  I would like the statement to go true when the oscillations for the current airspeed over time are small.

 

Thanks for your time helping me build this display:)

--

You received this message because you are subscribed to the Google Groups "IADS" group.

To view this discussion on the web visit https://groups.google.com/d/msg/iads/-/FOvQ0i67MC0J.

aviation76

unread,
Nov 4, 2011, 1:50:06 PM11/4/11
to ia...@googlegroups.com, ad...@iads-soft.com
Ah, thanks guys!  Looks like I have enough material to cause some serious damage:)  I will keep you guys posted with my outcome.

James Bretz

unread,
Nov 4, 2011, 1:52:38 PM11/4/11
to ia...@googlegroups.com
Yes, actually... If you're going to have these equations accessible across
everyone's desktop in the room, you'll need to either follow Adam's steps or
use the GetTestPointInfoEx approach..

The GetValue function is 'local' and only works on the Desktop that contains
the editBox. Adam's technique will ensure it works for the entire room.

We're enhancing this for version 8.0 to make things a lot easier. Basically,
you just tell the edit box what 'variable' you want to update and then use a
new function called GetUserInput( "VariableName" ) to access the value.

Jim

--------------------------------------------------
From: "Adam Chant" <ad...@iads-soft.com>

Sent: Friday, November 04, 2011 10:33 AM


To: <ia...@googlegroups.com>
Subject: RE: [IADS] Variance function

> Set your threshold airspeed to a constant. Say AirspeedCheck

Reply all
Reply to author
Forward
0 new messages