Skip to main content
VSira
Associate II
September 24, 2019
Question

Hi, I am using STM32f401 DISCO board and trying to generate sine modulated PWM through MATLAB. I am getting sine modulated PWM but the issue is of frequency.

  • September 24, 2019
  • 4 replies
  • 1105 views

..

This topic has been closed for replies.

4 replies

Ozone
Principal
September 24, 2019

Then you are doing it wrong.

The more detailed you describe your problem, the better chances are to get useful answers.

VSira
VSiraAuthor
Associate II
September 24, 2019

0690X00000ARZnEQAX.png0690X00000ARZmQQAX.png

VSira
VSiraAuthor
Associate II
September 24, 2019

Please refer 1st simulation picture.I need sine modulated pwm for 10ms and zero output for remaining 10ms. But it is giving me pwm for 100ms and off time is 100ms. when I am changing the sampling time of sine source to 1ms then it is providing desired pwm.

Cyril FENARD
ST Employee
September 27, 2019

​Hi @VSira​ ,

Could you also take a look at setting the solver step size in the configuration of your Simulink model.

Regards.

Cyril