How do I combine multiple inputs at different times
이전 댓글 표시

So I want to combine different inputs. I have a ramp function (1) which I want it to go from 0 to t1. Next to it I want to add a constant (2) which goes from t1 to t2. Then another ramp function (3) from t2 to t3 followed by another constant (4) from t3 to t4. Lastly I have a quadratic function (5) which goes from t4 to t5. All those functions combined I want to be my input source in a Simulink model. I defined every single function individually I just want to know how to combine them. I’ve attached an image to better understand my explanation. Thank you for your help!
답변 (1개)
Hari
2023년 10월 2일
0 개 추천
Hi Teodor,
I understand you want to combine different input functions in Simulink. You want to create a single input source in Simulink by combining the functions based on specific time intervals.
To achieve this, you can use the "Transport delay" block in Simulink to introduce a delay in the signal and finally add them using “add” block in Simulink. This will combine the different input signals.
To introduce specific time delays for each input function, you can set the delay values in the Transport Delay blocks accordingly. Here is an example of how you can set the time delays for each input signal:
- For the ramp function (1) with no delay: Set the delay value of the corresponding Transport Delay block to 0.
- For the constant (2) with delay t1: Set the delay value of the corresponding Transport Delay block to t1.
- For the ramp function (3) with delay t1 + t2: Set the delay value of the corresponding Transport Delay block to t1 + t2.
- For the constant (4) with delay t1 + t2 + t3: Set the delay value of the corresponding Transport Delay block to t1 + t2 + t3.
- For the quadratic function (5) with delay t1 + t2 + t3 + t4: Set the delay value of the corresponding Transport Delay block to t1 + t2 + t3 + t4.
By setting the delay values in this manner, you can introduce the desired time delays for each input signal and achieve the desired combination of functions.
Refer to the documentation of “Transport Delay” block for more information.
Hope this helps!
카테고리
도움말 센터 및 File Exchange에서 Sources에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!