- The horizon is 2, meaning we predict " t+2 " values.
- The prediction at " t=12 " was made at " t=10 ", using the available measured data up to " t=10 ".
What exactly does compare(___,kstep) plot?
3 views (last 30 days)
Show older comments
I read this material https://ww2.mathworks.cn/help/ident/ug/definition-simulation-and-prediction.html and I still can not figure out what each data point represent when I use compare(idataexample,sys,2).
For example, as mentioned here
at t = 10, we predict 2 steps:
yp(11|10) = 0.9ym(10) + 1.5um(10),
yp(12|10) = 0.9yp(11|10) + 1.5um(11).
And so on, at t = 11, we predict 2 steps,:
yp(12|11) = 0.9ym(11) + 1.5um(11),
yp(13|11) = 0.9yp(12|11) + 1.5um(12).
So, when
compare
finally gives a plot, what does the value at t = 12 represent? Is it yp(12|10), yp(12|11), or something else?
By the way, I think there might be an error in the example(CompareEstimatedModeltoMeasuredDataExample') in the documentation ("For instance, the point at t = 15s is based on output measurements taken at or prior to t = 5s").
Thanks in advance for your help!
0 Comments
Accepted Answer
Karan Singh
on 11 Feb 2025
First, I am not able to open the links you provided. I tried some modifications, but I still couldn't access it.
Now moving one to your query, when you run
compare(data, sys, 2)
The function evaluates 2-step-ahead predictions for every time step based on past measurements.
At each time step " t ", the prediction " yp(t+2∣t) " is computed using available past input-output data. When "compare" plots a prediction at " t=12 ", it is actually plotting " yp(12∣10) " because:
You can read more about it here: https://in.mathworks.com/help/ident/ref/compare.html#d126e31029
Karan
2 Comments
More Answers (0)
See Also
Categories
Find more on Residual Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!