How to delay start or reset time in Signal Editor?

조회 수: 2 (최근 30일)
Igor
Igor 2024년 5월 29일
답변: Igor 2024년 6월 18일
In my simulation a capacitor is getting discharged to the resistor.
When the capacitor voltage reaches a predetermined threshold, I need to start variable Duty Cycle PWM.
Duty Cycle value is coming from the Signal Editor.
How can I do that?
In other words – how can I start this circuitry not at time 0, but when the condition is met?

답변 (2개)

Ayush Modi
Ayush Modi 2024년 5월 30일
편집: Ayush Modi 2024년 5월 30일
Hi Igor,
You can achieve this using a Voltage Sensor block and a Switch block. Below are the high level steps to achieve this:
  • Place a Voltage Sensor block to monitor the voltage across the capacitor.
  • Use a Switch block to compare the measured voltage to the threshold.
  • Inside the path selected by the Switch block, place the PWM Generator block. Connect the duty cycle input of this block to the Signal Editor block.
  • Configure the rest of your circuit as needed, ensuring that the PWM signal controls the relevant part of the circuitry.
For more information, you can refer to the following MathWorks documentation:
  댓글 수: 2
Igor
Igor 2024년 5월 30일
Hi Ayush,
Thank you for the quick response.
I am doing my simulation similar to what you explained.
The main problem - Signal Editor starts at the beginning of the simulation (time = 0), but I need it to start, when my criteria is met.
I tried to use Enabled Subsystem with my Signal Editor inside, but it still starts at time = 0. Enabled Subsystem simply enables output, but doesn't start Signal Editor at the time of Enable signal.
Question still -
How to start Signal Editor using external signal?
Thank you,
Igor
Ayush Modi
Ayush Modi 2024년 6월 18일
편집: Ayush Modi 2024년 6월 18일
Hi,
Can you help me understand your use case? is there a specific requirement for signal editor to be delivering the PWM pulsewidth?

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


Igor
Igor 2024년 6월 18일
Hi,
"is there a specific requirement for signal editor to be delivering the PWM pulsewidth?"
In my simulation a capacitor is getting discharged to the resistor.
When the capacitor voltage reaches a predetermined threshold, I need to start variable Duty Cycle PWM.
Duty Cycle value is coming from the Signal Editor.
Specific requirement for the Signal Editor - start delivering signal at the time, when voltage reaches the specific threshold.
Time of this event is different for different load resistance.
Let me know, if I answered your question.
Thank you,

카테고리

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

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by