필터 지우기
필터 지우기

switching between 2 sources in simulink

조회 수: 3 (최근 30일)
KESARI HANUMANTHU
KESARI HANUMANTHU 2024년 5월 5일
답변: Prasanna 2024년 5월 9일
i have 2 sources in simulink model. how do connect 1st part of the circuit from source 1 for 5 seconds and connect both the sources from 5 seconds to 10 seconds in simulinkt . when 1st source is acting from 0 to 5 seconds, 2nd source should be isolated.

답변 (1개)

Prasanna
Prasanna 2024년 5월 9일
Hi Kesari,
In Simulink, to achieve the behavior of switching between two sources based on simulation time - where the first source is connected for the initial 5 seconds and both sources are connected from 5 to 10 seconds, with the second source being isolated initially, You can use a combination of "Switch," "Relational Operator," and "Constant" blocks, along with a "Clock" block to track simulation time. Initially, you place your two sources in the model. The "Clock" block is utilized to fetch the current simulation time, which is then compared against predefined time intervals using "Relational Operator" blocks. For the first phase (0 to 5 seconds), one "Relational Operator" block checks if the time is less than or equal to 5 seconds, controlling a "Switch" block to connect the first source to your circuit. For the second phase (5 to 10 seconds), another "Relational Operator" block checks if the time is greater than 5 seconds, which controls another "Switch" block to bring the second source into the circuit. The "Constant" blocks are used to define the switching conditions for the "Relational Operator" blocks. If combining both sources is required after 5 seconds, their outputs can be directed to an "Add" block or similar, depending on how you wish to combine the signals. This setup ensures that the first source operates alone initially, and then both sources are combined, adhering to the specified time-based switching logic.
For more documentation on the clock block, refer to the following documentation: https://in.mathworks.com/help/simulink/slref/clock.html
Hope this helps.

카테고리

Help CenterFile Exchange에서 Circuits and Systems에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by