Borrar filtros
Borrar filtros

How to create variable-frequency PWM

48 visualizaciones (últimos 30 días)
Daniel
Daniel el 7 de Jul. de 2014
Comentada: Dorai Yelaverthi el 10 de Mzo. de 2018
Hi all,
I am trying to create a variable-frequency PWM waveworm. That is, I want to be able to control frequency using an input signal or a variable that changes over time continuously.
I thought the easiest way to do this would be to use the "pulse generator" block and set the period to a variable. The next question of course is how to create a continuous time variable (such as a ramp) to dictate this. I don't know how to do this in either Matlab or Simulink.
I understand there are many ways to solve this problem. One way would be to stablish a variable name in Simulink that I can use as a variable in other blocks. Is this possible? If not, how else can I go about creating a variable frequency PWM waveworm (without getting too complicated creating my own subsystem). Should be very simple...
Thanks very much,
-Dan
  1 comentario
BISHMITA SHARMA
BISHMITA SHARMA el 2 de Dic. de 2017
hey, could u find a solution?? i need this too

Iniciar sesión para comentar.

Respuestas (2)

Dorai Yelaverthi
Dorai Yelaverthi el 19 de Feb. de 2018
Hi, These are the two methods(see screenshot below) I have figured out to do this.
The above two methods produce a sawtooth waveform that you can use as carrier for the PWM comparator. Just replace the constant (Frequency1 or Frequency2) blocks with any signal or variable you want to use to control the frequency. In the example simulink file variable frequency sawtooth (hyperlinked) a constant 100kHz sawtooth of amplitude 1 is generated.

rami ghali
rami ghali el 9 de Mzo. de 2018
hello I have tried the above design however I am not getting a sawtooth at the scope
  1 comentario
Dorai Yelaverthi
Dorai Yelaverthi el 10 de Mzo. de 2018
I just verified and it works fine. If you download the simulink file (hyperlinked in my original answer) and run it without editing any thing it should generate a 100 kHz sawtooth. The same simulink model is submitted by me to Matlab File Exchange with name 'variable frequency sawtooth carrier for PWM'. Download this and just run.
One important parameter that you have to change would the max step size of the simulation. I recommend you setting it to atleast 10 times (preferably 100) lower than the time period of the sawtooth waveform. In the simulink file provided I set the maximum step size in solver options to be 1e-7 since the frequency of the carrier was 1e5. There isn't a lot that can go wrong here.

Iniciar sesión para comentar.

Comunidades de usuarios

Más respuestas en  Power Electronics Control

Community Treasure Hunt

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

Start Hunting!

Translated by