Ramp up/down function based on the variable input in Simulink/Matlab

조회 수: 24 (최근 30일)
Aung Myat
Aung Myat 2019년 12월 27일
답변: Pramil 2024년 10월 30일
Hi,
I am kind of new to Simulink and I am having trouble trying to generate an output signal (as attached) which will be ramped up and down to a certain setpoint depending on the input signal. I have tried using the ramp up function with min block but so far this combination could not generate the desired output. The output stops ramping up after it reaches to the first setpoint.
Any suggestions? Your help is really appreciated.
  댓글 수: 7
Aung Myat
Aung Myat 2020년 1월 6일
Hi Raj,
Thank you very much for your suggestion.
José Carlos Ortiz Hernández
José Carlos Ortiz Hernández 2023년 8월 11일
Hi Aung Myat,
I am developing the same program and I have many problems. How could you solve it?

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

답변 (1개)

Pramil
Pramil 2024년 10월 30일
Hello Aung,
For your use case, the simplest way to generate the specified signal is by utilizing the "Signal Editor" block.
Yes, the above can be achieved by using "Ramp" and "Saturation" blocks but if you know the points at which the signal is changing, it could be easily built with "Signal Editor" block. Here is the link to the documentation of the same:
For the given use case, you can follow these steps to generate the signal:
  • Add a "Signal Editor" block in simulink and open it's dialog box.
  • Click on "open signal editor" icon. A new window will appear.
  • On the left side, click on "scenerio" and select "signal 1".
  • Add the points and their assoicated values on the right side.
  • Make sure to set interpolation to "linear". Once done save the signal in a MAT file.
  • The above MAT file will be used by the "Signal Editor" block. Check the "Interpolate data" checkbox in the dialog box to get the ramp signal.
Hope it helps.

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by