Ramp up/down function based on the variable input in Simulink/Matlab
이전 댓글 표시
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
Raj
2019년 12월 27일
I am not quite sure what you are looking for. Do you want to create this custom signal in simulink? Maybe you can use the Signal builder/Signal Editor block.
Aung Myat
2019년 12월 30일
Raj
2019년 12월 30일
In that case you should use the 'Rate Limiter' block. See this simple example:

This will give you output like this:

Where blue is your input and yellow is output. So instead you get "output in a ramping up manner, not changing the output instantly". This holds good for ramp down also. You can change the settings of the rate limiter block to get the desired output slope. Hope this helps!
Aung Myat
2019년 12월 30일
Raj
2019년 12월 30일
Well you can set the final value in your 'Step' block or you can use a saturation block to limit the output within predefined boundaries.
Aung Myat
2020년 1월 6일
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
2024년 10월 30일
0 개 추천
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.
카테고리
도움말 센터 및 File Exchange에서 Sources에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!