Predict function from system identification toolbox, which algorithm is it?
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
Hi,
Using System Identification Toolbox I have generated an ARMAX polynomial model. I want to use this to predict a state and compare them to some measurements in order to generate residuals. I found the predict function and it seems like it does what I want.
I have two questions:
Which method does the predict function use to predict?
How do I know that I'm using the correct predict function? I found a lot of others, and they're all called just predict. (I'm coming from python, so this is a bit confusing for me)
채택된 답변
Star Strider
2022년 4월 10일
The documentation does not go into any details as to how it works.
To see how well the estimated system fits the data, use the compare function. I would do that first, to be certain that the identified system is appropriate.
댓글 수: 8
Thanks. I can't quite understand the difference between the forecast and the predict function. My goal is to predict a state for T time steps into the future using inputs the whole time. This should be done using an ARMAX- model. I also want to use the last measurements before the prediction as initial values for the prediction. Which function best suits this purpose?
As always, my pleasure!
The forecast function is different from the predict function.
I would use forecast, because from the documentation:
- yf = forecast(sys,PastData,K) forecasts the output of an identified time series model sys, K steps into the future using past measured data, PastData.
- forecast performs prediction into the future, in a time range beyond the last instant of measured data. In contrast, the predict command predicts the response of an identified model over the time span of measured data. Use predict to determine if the predicted result matches the observed response of an estimated model. If sys is a good prediction model, consider using it with forecast.
The documentation does not go into any detail as to how it works, however Introduction to Forecasting of Dynamic System Response suggests to me that it does exactly what you want.
I’m learning from this as well. While I always use compare to see how the Bode plots of the estimated system fit the data in the frequency domain, the predict function apparently does the same in the time domain. The forecast function extends this into the future beyond the measured data used for the initial identification to additional time-domain results. (This is my impression from reading the documentation. I intend to explore these.)
.
Julian Jørn
2022년 4월 12일
편집: Julian Jørn
2022년 4월 12일
Thanks a lot! So if I understand correctly, both forecast and predict use the input, but predict also utilizes the measurements of the output too?
As always, my pleasure!
The way I read it, both do.
The difference is summarised (more or less) in the description of the outputs.
- The predict function (see yp) gives the extrapolated output to new values of the extrapolated input.
- The forecast function (see yf) extrapolates the outputs on the basis of known inputs.
Both return iddata objects.
I wish the documentation specifically discussed the differences, and in more detail.
Thanks! This has been helpful.
As always, my pleasure!
I have requested MathWorks to help clarify the differences between the two funcitons. I will post back if their reply is at variance with what I have written here. I also requested a new documentation page about the differences and in the different applicatioons each would be best to use.
That's nice!
Star Strider
2022년 4월 13일
편집: Star Strider
2022년 4월 13일
Thank you!
EDIT — (13 Apr 2022 at 19:36)
It turns out that my interpretation is correct.
MathWorks reply (in part):
- However, their main difference can be found on the documentation page itself. In the 'forecast' function documentation page Forecast identified model output - MATLAB forecast (mathworks.com), you can see under the Description: 'forecast performs prediction into the future, in a time range beyond the last instant of measured data. In contrast, the predict command predicts the response of an identified model over the time span of measured data. Use predict to determine if the predicted result matches the observed response of an estimated model. If sys is a good prediction model, consider using it with forecast'. This can be illustrated in the plots from the examples Forecast identified model output - MATLAB forecast (mathworks.com) using 'forecast' function and Predict K-step-ahead model output - MATLAB predict (mathworks.com) using 'predict' function.
So predict is the time-domain equivalent of compare, and forecast extends the model response to future values of the independent variable.
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Time Series Analysis에 대해 자세히 알아보기
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
