Real-time Self Compensating AC/DC Digitally Contolled Powe Supply Dave Feeman, Mak Hagen Texas Instuments Digital Powe Goup
Digital Contol Poblem: Detemining optimal loop compensation given uncetainties of: line, load and tempeatue vaiation component toleance, paasitics step esponse Solution: Utilize the pocessing powe of a digital contolle to measue the tansfe function of the loop and fom this measuement make adjustments to the digital compensation coefficients. Sep06
Tansfe Function Measuement To pefom Tansfe Function Analysis (TFA) we need to: Geneate a sinewave excitation signal Inject that signal at a summing junction Captue the esponse of the system to the excitation Fom this esponse, calculate the open loop gain Fom the open loop gain detemine key pefomance metics of bandwidth, gain magin and phase magin. Fo a digitally contolled system the logical location to make the measuement is just befoe o just afte the digital compensato. Sep06 3
Measuement Locations Sep06 PWM u c u' G(s) powe stage digital contolle d d H(z) digital compensato x Inject a sinewave at d o d Measue esponse at node e, x, c o u Solve fo y' e ADC y - Given the following basic system equations: y = Gu u = c + d c = Hx x = e + d e = y The closed loop esponse fo each node is y = + d H H u = + d H H c = + d x = + d e = d G + d + d d G d G d 4
Gain calc's fo vaious nodes Tansfe gains at each node: inject at d d measue at y u c x e H H G G G Calculation of open loop gain G(f)H(f) fom measuements at each node: inject at d d y Y D Y Hy d Hy measue at u c x e Hd Hd d e u c x d + e d c Hx He u d + c d + Hx d + He Sep06 Note that the fomula fo calculating open loop gain contains the compensato gain H(f) if the system is excited befoe the compensato and measued afte, o vice-a-vesa. This is not a big poblem since a digital compensato is completely deteministic and its fequency esponse can be calculated as: z = exp( jπf T ) = cos( πf T ) + j sin( πf T ) H ( f ) meas meas b0z + bz + b = z + a z + a s meas s meas (fo a nd ode compensato) s 5
Sinewave Geneation Sep06 Use table look-up technique TI digital contolles, including the UCD950, have a build-in sinewave table in ROM. Fo each sample step though the table with a step F size defined as meas step = N table sampleate then tableindex = tableindex + step When the end of the table is eached, wap to the beginning of the table by subtacting the table length fom the index. By maintaining the factional pat of the table index and ounding to detemine the table enty, vey high fequency esolution can be obtained. F 6
Sep06 Response Measuement The definition of a Discete Fouie Tansfom (DFT) is: K = N ( vn ) n= 0 N n= 0 jπnk / N k cos π N This says that we can calculate the eal and imaginay magnitude of the kth hamonic of a signal by multiplying that signal by a sine and cosine sequence and summing. Since we've aleady geneated a sinewave to inject into the loop as the excitation signal, the esponse measuement is simply: ucossum += u*bcos; k v usinsum -= u*bsin; n e n k j sin π N n // Accumulate cosine // sum fo measuement node u // Accumulate sine // sum fo measuement node u (Note that the cosine sequence is easily geneated by adding an offset to the sine table index of /4 the table length.) 7
Example Calculation of G(f)H( )H(f) Inject at d, measue at c Inject at d, measue at e u' G(s) powe stage y' u' G(s) powe stage y' PWM u c digital contolle H(z) digital compensato e ADC y - PWM u digital contolle H(z) digital compensato x e ADC y - d cos z - cossum cossum z - d cos d sin z - sinsum sinsum z - d sin Sep06 Retun cossum and sinsum fo each injected excitation fequency. Calculate open loop gain as follows: c ( cossum + j sinsum) = = d + c N / D + cossum + j sinsum ( ) cos ( D c + C + C ) i jdci = D + DC + C + Ci Whee D cos is the base to peak amplitude of the excitation and N is the # samples. e = = d + e = ( cossum + j sinsum) ( N / ) D + cossum + j ( D E + E + E ) D + D E cos jd Ei + E + E i Then plot magnitude and phase of G(f)H(f) to detemine phase magin and bandwidth i sinsum 8
Pactical TFA measuements Sep06 Windowing The definition fo the DFT poduces the esponse just at hamonic fequencies. These fequencies poduce an intege numbe of cycles in the measuement inteval. At othe fequencies you need to do something to educe "leakage". Settling. Window the measuement data. A aised cosine o tiangle window ae popula options.. Modify the measuement inteval so that an intege numbe of cycles ae measued. (What we implemented.) We want just the foced esponse, so the contolle needs to wait some numbe of samples fo the natual esponse to decay. 9
TFA Physical Implementation Fully Digitally contolled Telecom Rectifie 48V-000W output, 85V-60V 50/60 Hz input Inteleaved Boost PFC stage Phase shifted full-bidge DC/DC stage Sep06 0
Rectifie Schematic Sep06 Digital Contolle Implements 3 loops (PFC cuent, PFC voltage and DC/DC voltage), plus cuent shaing between PFC phases. Sequencing, Soft stat/stop and OC/OV/UV. Manages seial inteface and pefoms TFA.
Self-Measued Bode Plots Sep06 PC pogam issues seial bus commands to measue esponse at a given fequency. command defines fequency amplitude numbe of samples to delay numbe of samples to measue contolle etuns cosine and sine coefficients fo that fequency Repeated fom stat to stop fequencies to poduce Bode plot fo each loop Calculate plant tansfe function and use this to exploe effect of changes in compensation.
TFA (Bode) Design Tool Select contol loop Select which pat of the loop to display BW gain magin phase magin Tansfe Function Analysis (measue Bode) Digital coefficients magnitude plot Update coefficients based on PID gains Update coefficients based on analog poles & zeos phase plot Status Sep06 3
Self-Compensation Recall fom sheet 8 that c DC + C + Ci = = d + c D + D C + C + C then phase mag ( ) ( ) i i D + DC + C + Ci = = atan DC C D + C = DC + C D i + C C i + D C + C i + C j + C Reaanging the equation fo magnitude, at the zeo db coss-ove fequency mag D + = ( + ) = 0 DC C Ci mag i Inject excitation signal at desied system BW fequency. Use adapteo = (D cos + C 4/N) to locate the zeo db coss-ove. Adjust compensato gain (numeato coefficients) to zeo adapteo. Calculate phase magin to check system stability. D C nomalized magnitude 3 0 - - sinsum/n cossum/n -3 0 3 0 4 feq 0 5 openloop gain adapteo Sep06 4
Summay Sep06 Digital Powe enables sophisticated chaacteization of each contolled powe stage in situ (in place) Thus enabling (in ode of complexity) No-test-equipment-equied measuement duing poduct development Simplified manufactuing test Auto tuning/customization duing manufactuing Auto tuning and customization in the end-equipment application Account fo aging, changes to the end use system. Digital contol enables multiple compensation settings: standby, low-powe, full load, etc. Each optimized in situ. 5