Effacer les filtres
Effacer les filtres

Pulse width modulation using simscape blocks

23 vues (au cours des 30 derniers jours)
KRISHNA
KRISHNA le 18 Juil 2024 à 14:09
Réponse apportée : Deep le 19 Juil 2024 à 9:44
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?

Réponses (1)

Deep
Deep le 19 Juil 2024 à 9:44
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!

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by