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.

HELP:QG8 used as PWM Buck regulator

Status
Not open for further replies.

abicash

Member level 3
Member level 3
Joined
Jun 26, 2007
Messages
60
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
www.florispower.com
Activity points
1,772
Hello

I am trying to control a 48vdc input to 12vdc output with a QG8 PWM of 6KHz.
The current control is at 50A and it just folds back.
For this i used a buck topology and it seems to work fine under no load condition.
But there is a lot of instability at the output once a load is introduced.
My correction code is called in MTIM ISR at every 8ms thus


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
if(battery_voltage<=Volt_limit) //12v =2v  
          {   
            duty_cycle_variation++;  
            if(duty_cycle_variation>=DUTY_CYCLE_MAX)duty_cycle_variation=DUTY_CYCLE_MAX;  
              
              if(current_adjust>=Current_max) //350=50A  
              {   
                duty_cycle_variation=duty_cycle_variation-2;  
               if(duty_cycle_variation<=1)duty_cycle_variation=1;  
              }  
          } else //if(battery_voltage>=Volt_limit)  
            {  
              duty_cycle_variation--;  
              if(duty_cycle_variation<=DUTY_CYCLE_MIN)duty_cycle_variation=DUTY_CYCLE_MIN;  
             }


I understand that a PI(D) control would be required.
Can anyone help me understand how this can be implemented with a QG8?

All help appreciated
 

A digital controller with 8 ms cycle time will be able to react only on rather slow load or input voltage variations. It might be unsuitable for your application.

What you made is a kind of integral controller acting only on the sign of the error signal. A usual I controller would make the integral correction depending the error signal, a PI controller would add an immediate proportional correction.

Are you controlling a sychronous(transistor-transistor) or asynchronous (transistor-diode) buck converter. A asynchronous converter has the specific problem of variable gain in discontinuous current mode at low loads.
 

Hello FvM

Thanks for the reply and warning noted :smile:

The DUTY_CYCLE_MAX here is a count of 550 ,corresponding to 90% of a PWM of 6.66khz.
Every 8ms , the duty is incremented(or decremented) only once.

i have an asynchronous converter with a series MOSFET and a diode from source to ground and an inductor from source to o/p positive.

Load response is very poor ,so is stability.

Can you guide me what needs to be done to improve the response and overall stability?
Some code snippets would be very helpful.
 

Hello
I have been looking at some PID implementation from Freescale AN4105

Code:
Error = Set Point Current – Current Feedback
The output of the PID control is given by following Equation 
DutyCycle [i] = DutyCycle[i–1] + Kp × ProportionalFactor[i] + Ki × IntegralFactor[i] + Kd × DerivativeFactor[i]
Where:
• ProportionalFactor [i] = Error [i]
• IntegralFactor[i] = {Error[i] + Error[i-1]} × T/2
• DerivativeFactor[i] = {Error[i]-Error[i-1]} × T
And:
• Kp is the proportional constant
• Ki is the integral constant
• Kd is the derivative constant
• i is present time value
• i–1 is the previous time value
• T is the sampling period (this value is considered = 1 to simplify calculations)
The control loop is integrated into the 8-bit microcontroller without using floating-point mathematics.
16-bit variables were used to perform the calculations.
Also, because Kp, Kd, and Ki are typically fractional numbers, the control loop operates on the
integer-division results of the reciprocals (1/Kp, 1/Kd, and 1/Ki).
The control algorithm constants used for the implementation are:
• 1/Kp = 45 → Kp = 0.022
• 1/Ki = 80 → Ki = 0.0125
• 1/Kd = 100 → Kd = 0.01

Although i am struggling to understand , how its adapted for an 8-bit controller.

Can anyone educate me in applying the algorithm in my code?
Help really appreciated....
 

A sample rate of 125 Hz might even allow float arithmetic for the PI or PID controller. Otherwise you'll implement some well considered integer respectively fixed point (integer with an implicite scaling factor, preferably a power of two) arithmetic for the controller.
 

Hi FvM

I have implemented this and taken some observations.
I only took PI and omitted D
The code looks thus
Code:
Error =  Volt_limit - battery_voltage;
           //if(Error<0)Error = -Error; 
  duty_cycle_variation = duty_cycle_variation_old + (Error/40) + ((Error-Error_old)/160);

With this i get a fairly stable o/p voltage near 12v
12.5v and oscillations of 100mv
I loaded this with a Dc-Ac inverter 12vdc/230vac and loaded the inverter with some incandescent lamps.
The o/p voltage sets at an offset voltage to 12v (maybe 12.9v or so, but not confirmed near that voltage)
I found that the inverter pushes some ripple/noise on the 12v, so maybe thats the reason, but not sure.

Overall this scheme works satisfactorily
I tried to tune the PI parameters but with the values in code, do i get most satisfactory results.

Can you comment?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top