simulink using triggered function to update variables of a second function
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!