필터 지우기
필터 지우기

Simulink Logic - Capturing a Signal Value at a Specific Point for Control

조회 수: 18 (최근 30일)
PB75
PB75 2022년 12월 7일
댓글: PB75 2022년 12월 13일
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.
Its a basic logic question, but any help would be great,
Cheers
Patrick

채택된 답변

PB75
PB75 2022년 12월 7일
Hi Fangjun,
As in the following? Using a DataStoreMemory block in the triggered subsystem?
  댓글 수: 2
Fangjun Jiang
Fangjun Jiang 2022년 12월 7일
Put the DataStoreMemory block outside. Inside, import the position signal, feed it to a DataStoreWrite block.
PB75
PB75 2022년 12월 13일
Thanks Fangjun.
I have removed the DataStoreWrite block as the triggered subsystem captures the signal at that point.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Fangjun Jiang
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.

카테고리

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

태그

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by