How to connect AC voltage block to 2 level PWM generator block in simulink
Ältere Kommentare anzeigen
Hello. Kindly advise me as to how I can connect a AC voltage block to the PWM generator block (use AC block as the external modulating signal) and get PWM pulses.
Should I use any other block in middle? thanks
Antworten (1)
Charu
am 17 Jun. 2025
0 Stimmen
Hello Gene,
From your question I get that you want to connect an AC voltage block to the PWN generator block.
There are two ways to implement PWM modulation using an AC signal — either in Simulink or in Simscape:
- Simulink Approach (Control-Domain): Use a Sine Wave block (from Simulink > Sources) to generate an AC-like signal. This signal is then scaled and biased (usually using Gain = 0.5 and Bias = 0.5) to shift it into the [0, 1] range, which is required for the PWM Generator (Voltage-Controlled) block. This method is best for control logic, fast simulations, and when you only need to generate PWM signals — not simulate real electrical behavior.
- Simscape Approach (Physical-Domain): If you're working in Simscape and want to use a real AC Voltage Source (from Simscape > Electrical), measure the voltage using a Voltage Sensor, convert it to a Simulink signal using a PS-Simulink Converter block, and then feed that into the PWM generator after scaling. This method is more suitable for simulating physical electrical systems and actual power flow.
Here is a sample Simulink model for the same:

Hope this helps!
Communitys
Weitere Antworten in Power Electronics Control
Kategorien
Mehr zu Simulink finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!