Jump to content

Signal() Formula


Ali

Recommended Posts

Hello, 

I'm trying to use the signal() formula to create a signal that increases by 2 F  temp. per day for one year. For some reason, when I build the

$newsignal = signal(Interpolation.Linear, 365d, sample(now(),100), sample(now()+365d, 100+2*365))

$signal.ForecastSplice($newsignal) , it only interpolates and shows values for the next 60-70 days. Is there a reason why I can build a longer trend and splice it with an existing signal ?

 

Thanks

 

Link to comment
Share on other sites

  • Administrators

Hello Ali,

If I understand your question correctly you want to splice a signal that increase 2°F per to the end of some temperature signal such that the newly spliced signal starts at the last known value of your temperature signal. 

1. The following syntax in the formula tool will create a signal that increases 2°F per day starting at now.

(timeSince(toTime(now()), 1d)*2).setUnits('F')

Capture.PNG

2. Then to splice them I suggest following syntax.

$signal.forecastConstant(365d) + $IncreasingTemp

Capture1.PNG

The final result:

Capture2.PNG

Hope this helps,

Teddy

Link to comment
Share on other sites

Thank you Thorsten & Teddy. 

Teddy, 

I used both of the formulas you mentioned but for some reason I only getting the future time signal. 

image.png.d0363dc02c24c43a0959ab587aba0f00.png

I used:       (timesince(toTime(now()),1d)*2).setUnits('F')     for green line

And            $Temp.forecastConstant(365d)+$f10                   for orange line {$f10 is the green line}

 

Thanks

Link to comment
Share on other sites

  • Administrators

Ali, 

To combine them into one signal you can use the following syntax in the forecast formula from step 2. 

$signal.forecastConstant(365d) + 0.toSignal().splice($IncreasingTemp,$IncreasingTemp.isValid())

Screen shot for details:

CaptureA.PNG

Note: This will result in a completely uncertain(dashed) signal. This is because of it's dependence on now() in the first formula.

Hope this helps,

Teddy

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...