Problem with exact replication of maglev narx closed-loop output
이전 댓글 표시
I wrote a simple Matlab code to calculate a narx within the maglev example. The goal was to replicate the closed-loop output from the usual Matlab expression yc = netc(xc,xic,aic). My code is within the maglev example and uses the weights and bias' from the trained narx, so there shouldnt be any precision issues with reading weights from another file. The problem is my code does not perfectly replicate the closed-loop output. It is very close, and sometimes spot-on, but doesnt replicate perfectly every time.
Has anyone had this problem? I am not arrogant enough to seriously suspect a problem with Matlab, but I have to ask the question to see if anyone has had this issue. It is likely something silly with my code. I can trim it down to a reviewable size if anyone would like to help me out.
Thanks, Cal
채택된 답변
추가 답변 (1개)
Greg Heath
2014년 5월 9일
Closed loop designs have the irritating property of propagating errors.
Typically, just closing an openloop design is not sufficient.
After using the closeloop fuction to convert from openloop, you should train the closeloop net starting with the weights obtained from the openloop design.
Search
greg closeloop
I probably have some examples in the NEWSGROUP and/or ANSWERS.
Hope this helps.
Thank you for formally accepting my answer
Greg
댓글 수: 7
Calvin
2014년 5월 10일
Greg Heath
2014년 5월 12일
Hope this helps.
Thank you for formally accepting my answer
Greg
Calvin
2014년 5월 15일
Greg Heath
2014년 5월 19일
Impossible for me to respond when you refer to code which i have not seen. Since there are many ways to approach the problem, I would be wasting my time if i tried to guess exactly what you are trying to do and how you are trying to do it.
However, it shouuld be relatively easy for me to comment on posted code.
Greg Heath
2014년 6월 27일
>>
net = narxnet(10);
inputprocessfcn = net.inputs{2}.processFcns
outputprocessfcn = net.outputs{2}.processFcns
inputprocessfcn =
'removeconstantrows' 'mapminmax'
outputprocessfcn =
'removeconstantrows' 'mapminmax'
Hope this helps.
Greg
Calvin
2014년 7월 3일
Greg Heath
2014년 7월 4일
It is a little confusing. Openloop narx has 2 inputs and 1 output
>> net.outputs
ans = [] [1x1 nnetOutput]
Therefore, the only output is net.outputs{2}
>> net.inputs
ans = [1x1 nnetInput]
[1x1 nnetInput]
Therefore, there are 2 inputs ( {1} and {2} ). However
>> net.inputs{1}
ans = ... name: 'x'
feedbackOutput: [] %input from exogeneous input, x
...
and
>> net.inputs{2}
ans = ... name: 'y'
feedbackOutput: 2 %input from 2 output feedback delays
Hope this helps.
Greg
카테고리
도움말 센터 및 File Exchange에서 Parallel and Cloud에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!