Ramp up/down function based on the variable input in Simulink/Matlab
57 次查看(过去 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 个评论
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,11:09
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!