Simulink Logic - Capturing a Signal Value at a Specific Point for Control
11 次查看(过去 30 天)
显示 更早的评论
Hi,
I am creating a controls model in Simulink and need to capture a simulink signal at a specific point in the simulation, and then keep the value to use as an input to the controller for the next cycle. I can capture the signal value from the point of interest (velocity = 0) to the end of the simulation, but I would like to lock that value at the trigger point and then reset at the next. I have added a screen grab to show the blocks I am using, and the output.
The value I need to capture is the position when the velocity reaches 0, so when the position changes direction.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1222952/image.jpeg)
Its a basic logic question, but any help would be great,
Cheers
Patrick
0 个评论
采纳的回答
PB75
2022-12-7
2 个评论
Fangjun Jiang
2022-12-7
Put the DataStoreMemory block outside. Inside, import the position signal, feed it to a DataStoreWrite block.
更多回答(1 个)
Fangjun Jiang
2022-12-7
The logic of velocity >=0 will generate a step output signal. Use this signal to trig a triggered subsystem. Specify the trigger as rising edge. Inside, use Memory Write block to store the value.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!