How to vary Gain in Simulink dependent on input's amplitude and phase during runtime ?
조회 수: 7 (최근 30일)
이전 댓글 표시
The Gain block and continuous block in Simulink require the user to specify a gain. This can be a workspace variable. But I want to vary this gain during runtime. I can't seem to get a solution for this. This idea is simple but I can't believe it is so difficult to implement.
I have tried using another block to write to workspace, but found out that the 'to workspace' block only writes to the workspace after the simulation ends or pauses.
I can store the variable in a data memory block, but I don't know how to specify the gain value(s) for the gain/PID block in this case.
댓글 수: 2
Nikhil N
2021년 7월 24일
Can you provide the scenario where you would require to change the gain value?
답변 (1개)
Fangjun Jiang
2021년 7월 29일
Use the Product block. The Gain block is an operation of multiplication, right?
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulink Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!