How to delay start or reset time in Signal Editor?
古いコメントを表示
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
2024 年 5 月 30 日
編集済み: Ayush Modi
2024 年 5 月 30 日
0 投票
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:
- Switch block: https://www.mathworks.com/help/simulink/slref/switch.html
- Voltage Sensor block: https://www.mathworks.com/help/simscape/ref/voltagesensor.html
2 件のコメント
Igor
2024 年 5 月 30 日
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?
カテゴリ
ヘルプ センター および File Exchange で Communication in Simulink についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!