Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need code to correct duty cycle using PID tuning

Status
Not open for further replies.

praveen_palaparthi

Full Member level 1
Joined
Feb 15, 2008
Messages
98
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,288
Activity points
2,214
Help required experts

Hi friends i am doing single phase sinusoidal PWM inverter using micro controller.I have generated sine wave at output using sine table.My controller is pic 16f886 output frequency is 50Hz,and swicthing frequency is 20Khz and output at no load is 250 volts rms.I used PWM modules in the controller to generate SPWM.

My problem is when i am switching the load of 200W bulb its output voltage is decreasing to 200V rms.How to correct this voltage.Theory says that by changing modulation index Ma=Ar/Ac Ar=peak amplitude of reference wave,Ac peak amplitude of carrier wave,we can get varaible volta ge but how to implement this in code.I mean how to correct(increase or decrease) the duty cycle.I know by using PI tuning we can get but i dont know how to implement i am not getting the logic can anybody help to get the logic.

can anybody give examples code for this to correct duty cycle using PID tuning
 

Re: Help required experts

HI

You need to sample the output voltage (or current) back into the controller and change the PWM acording to load

All the best

Bobi
 
Re: Help required experts

Hello sir for responding to my post.As u know i am doing sinsuoidal inverter using PIC 167886.How to update my duty cycle.sir can u expain me in details as i am new to this type of project.How to vary the duty cycle according to reference value.......
 
Re: Help required experts

With sinusoidal control you change the amplitude of the sine wave to vary the output voltage.
Download application note AN1017 from Microchip.
This is an application note for driving a brushless motor with a sinewave, but gives the algorythms for changing amplitude.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top