Pulse width modulation using simscape blocks

20 ビュー (過去 30 日間)
KRISHNA
KRISHNA 2024 年 7 月 18 日
回答済み: Deep 2024 年 7 月 19 日
I am trying to model DC motor control by PWM. I tried to model the PWM with in built simscape blocks. When I connect scopes across the H bridge, it is the same as the input constant DC voltage.
I have attached the picture of the model and the plot.
I used part of the exact same model from the example ('simscapeelectrical/PWMControlledDCMotorExample')
What is the problem here?

回答 (1 件)

Deep
Deep 2024 年 7 月 19 日
Hi Krishna,
I understand you are seeing a straight line upon measuring through the “Voltage Sensor” block instead of the expected square wave of a PWM signal.
This is because the simulation mode of the Controlled PWM Voltage block in the mentioned example model is set to Averaged. When set to Averaged”, the output signal is the average of the PWM signal, which appears as a straight line.
Here are the steps to switch to the PWM signal:
  1. Double-click on the "Controlled PWM Voltage" block to open its parameters.
  2. In the block parameters window, find the "Simulation mode" setting.
  3. Change the "Simulation mode" from "Averaged" to "PWM".
After making this change, you should see the expected square wave of the Pulse Width Modulation signal when you attach a “Voltage Sensor.
For more detailed information about the simulation modes of the "Controlled PWM Voltage" block, you can refer to the following documentation:
Hope this helps!

カテゴリ

Help Center および File ExchangeConverters (High Power) についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by