Parameters initialization problem of simulink block which inputs are other block's output
이전 댓글 표시
Hello all, i meet some trouble in simulink block inputs initialization process.
As shown in figure. The Pd_Mctrl block's inputs Xm, qm, dqm.... are the other block's output in this model. Besides, these inputs demensions are not 1*1.(e.g, qm=3*1)
Because of the clock related input signal, the Pd_MCtrl block is compiled first by simulink. Then Xm, qm, dqm.... demensions are set as 1*1 automaticly, that's the problem i meet. In this Pd_MCtrl block, i use q1 = qm(1), q2 = qm(2) for example, the second demension is exceed the initialized demension1*1. I dont know how to fix this problem. Furthermore, the initial parameter of X, dX, J ..... i expected are from matlab workspace variable, dont know how to fix this problem either. I tried use InitFcn callback of Pd_MCtrl block, but seems not work, still meet the demension problem. If the initialization parameters Xm,dXm... are the workspace's vector/ matrix, it will be good for this model.
Thank you for your assistance.

답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Event Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!