PWM output
PWM output
Dear Lubin,
I'm working in a small project for my university. I'm trying to generate the code for the 30f2010. I'm in a preliminary process. I try to use the PWM exit control a chopper, with the duty cicle and period as variables.
I've tried with the OC compare block, and also with the PWM motor output block, but i don't success. Can you help me? I've read all the forum and seen all the examples, but I'm blocked at this position.
At this moment I can't do a print screen, I hope tomorrow I could do.
Thanks
I'm working in a small project for my university. I'm trying to generate the code for the 30f2010. I'm in a preliminary process. I try to use the PWM exit control a chopper, with the duty cicle and period as variables.
I've tried with the OC compare block, and also with the PWM motor output block, but i don't success. Can you help me? I've read all the forum and seen all the examples, but I'm blocked at this position.
At this moment I can't do a print screen, I hope tomorrow I could do.
Thanks
-
- Site Admin - Expert
- Posts: 616
- Joined: Wed Mar 07, 2007 11:23 pm
- Location: Bayonne- France
- Contact:
Re: PWM output
Hi Defe,
Could you upload your Simulink model file ? or a screenshoot as you like...
Could you upload your Simulink model file ? or a screenshoot as you like...
Re: PWM output
Hi,
here's a pic of the model. Ocmax is the period and Ocmax/3 is the duty cycle. Is anything wrong?
The PWM output has only one input. Can I use this block and how?
My objetive is have a PWM output which variables are the duty cycle and period.
Thanks
here's a pic of the model. Ocmax is the period and Ocmax/3 is the duty cycle. Is anything wrong?
The PWM output has only one input. Can I use this block and how?
My objetive is have a PWM output which variables are the duty cycle and period.
Thanks
- Attachments
-
- model.jpg (23.71 KiB) Viewed 15537 times
-
- Site Admin - Expert
- Posts: 616
- Joined: Wed Mar 07, 2007 11:23 pm
- Location: Bayonne- France
- Contact:
Re: PWM output
Hi Defe,
This model should work. You should get a duty cycle of 1/3. If it doesn't, try forcing the sampling rate of the constant to .001 for example.
Using the OC block, you will be able to get a PWM signal with variable duty cycle and period. You just have to care about scaling theses two values with regards to OC?max.
The PWM Motor block has only one entry for duty cycle. Thus, it is not possible to get a variable period with this block. The period is fixed in the dialog box parameters.
Lubin
This model should work. You should get a duty cycle of 1/3. If it doesn't, try forcing the sampling rate of the constant to .001 for example.
Using the OC block, you will be able to get a PWM signal with variable duty cycle and period. You just have to care about scaling theses two values with regards to OC?max.
The PWM Motor block has only one entry for duty cycle. Thus, it is not possible to get a variable period with this block. The period is fixed in the dialog box parameters.
Lubin
Re: PWM output
So wait, you can't change the duty cycle of the PWM wave?
EDIT: Never mind, I need to learn to read
EDIT: Never mind, I need to learn to read
Re: PWM output
What I am asking is how can I change the duty cycle in the PWM block?
-
- Site Admin - Expert
- Posts: 616
- Joined: Wed Mar 07, 2007 11:23 pm
- Location: Bayonne- France
- Contact:
Re: PWM output
On OC block, duty cycle is set for example throw the OCx_Up. Period is set throw period. But theses input can be change into OCx_Up and OCx_Down in the dialog box.
Re: PWM output
hie sir..
i am a undergraduate student.. i am doing a project where i want to control the output voltage of the BOOST converter..
the controller i am using is PI control.. i am giving the error voltage to the PI controller.. this controller will give a signal and i am comparing that signal with a ramp wave which which give the pulse to switch on the MOSFET... i tested that circuit in matlab simulink and it is working also..but for implemeting that with DSPIC toolbox what i have to change..
i am very new to this microcontroller....i tried for many days but i am unable to move furture..
waiting for u r reply..
i am a undergraduate student.. i am doing a project where i want to control the output voltage of the BOOST converter..
the controller i am using is PI control.. i am giving the error voltage to the PI controller.. this controller will give a signal and i am comparing that signal with a ramp wave which which give the pulse to switch on the MOSFET... i tested that circuit in matlab simulink and it is working also..but for implemeting that with DSPIC toolbox what i have to change..
i am very new to this microcontroller....i tried for many days but i am unable to move furture..
waiting for u r reply..
Who is online
Users browsing this forum: No registered users and 29 guests