simulink using triggered function to update variables of a second function

조회 수: 7 (최근 30일)
Shane
Shane 2011년 11월 8일
Hey everyone so essentialy what I am making is an adaptive controller. My main function is a matlab function which uses the 4 state space control matricies and persistent state variables to act as the the control (essentially a discrete state space with time varrying matricies). Now my triggered function every second identifies the main frequencies and updates the controller coefecients.
I am using data store memory blocks. My triggered function uses the global variable method to access the matricies. Where as the control routine uses data store memory read. Every time step thought (.001s) i get an error saying that the data store memory read blocks are trying to read before the triggered system finished writing.
Do you havbe adifferent idea for updateing the matricies or is data store memory the right way.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by