UCD3138 Integral Branch of the PID Filter

Application Report
SLUA729 – October 2014
UCD3138 Integral Branch of the PID Filter
Neil Li
China Telecom Application Team
ABSTRACT
Digital power controller UCD3138 filter is a PID filer, which includes proportion branch, integral branch
and differential branch. A register at the output of integrator, named KI_YN, supports write and read
operations. In application, writing this register could make the DPWM change rapidly, which is
convenient for some designs. The KI_STALL register in the integrator stalls its elements at the current
value. It is useful for suppressing response to transients when such response is not desirable. This
application note provides the guidance of applying the integrator, as well as several real experimental
tests.
1
2
3
4
5
Contents
UCD3138 PID Filter and Integral Branch ..................................................................................... 2
1.1 UCD3138 PID Filter ................................................................................................................ 2
1.2 Integrator Branch .................................................................................................................... 2
The Application of Writing KI_YN................................................................................................ 3
2.1 Change DPWM Duty by Modifying XN .................................................................................... 3
2.2 Change DPWM Duty by Modifying KI_YN .............................................................................. 4
2.3 Pre-bias Design ...................................................................................................................... 5
Stall Calculation of Integral Branch ............................................................................................ 6
3.1 Introduction ............................................................................................................................. 6
3.2 Demonstration ........................................................................................................................ 6
Conclusion.................................................................................................................................... 8
References .................................................................................................................................... 8
Figure 1.
Figure 2.
Figure 3.
Figure 4.
Figure 5.
Figure 6.
Figures
UCD3138 PID Block Diagram .......................................................................................... 2
Change DPWM Duty by Modifying XN ............................................................................ 4
Change DPWM Duty by Modifying KI_YN ...................................................................... 5
Soft-Start With Pre-bias ................................................................................................... 6
DPWM Duty Change With Enabling Stall ....................................................................... 7
Change of DPWM Duty After Disable Stall ..................................................................... 8
1
SLUA729
1
UCD3138 PID Filter and Integral Branch
1.1
UCD3138 PID Filter
Figure 1 shows a block diagram of the first part of the filter, PID architecture. The UCD3138 PID filter
includes proportional branch, integral branch, and differential branch. All values shown in the filter are
signed numbers. The main input to the filter is a 9-bit signed value from an Error ADC. The main input
is shown as XN at the upper-left of Figure 1. The sum of the output of these branches determines the
DPWM duty, which is implemented at the cascaded parts of PID filter.
Figure 1.
1.2
UCD3138 PID Block Diagram
Integrator Branch
The XN value, or the XN + XN-1 sum is multiplied by the KI coefficient. The output of this multiplication
always fits within 24 bits. This value is then added to the existing KI_YN value. The hardware
automatically clamps KI_YN value at a 24-bit signed number, and high and low clamp registers
(KI_CLAMP_HIGH and KI_CLAMP_LOW) are available which can be used to clamp KI_YN value to
lower values. If the value of KI_YN is between KI_CLAMP_HIGH and KI_CLAMP_LOW, the output
value of the integrator is exactly the value in KI_YN.
2
UCD3138 Integral Branch of the PID Filter
SLUA729
2
The Application of Writing KI_YN
2.1
Change DPWM Duty by Modifying XN
When the power supply is in regulation, the XN is relatively small, hence the output of proportional
branch and differential branch are both closed to 0. But, the output of integrator is extremely large.
When the XN is modified, the integrator performs calculation and refreshes the output. After a certain
period of time, the output is stable with the new value. According to this, the DPWM duty needs a
certain time to finish its change. This certain period of time is determined by the coefficients of PID.
Design an experiment to demonstrate. Run open-loop firmware, and change XN from initial 100 to -30.
Meanwhile, measure the time that DPWM duty finishes its change. The firmware design follows. Send
the PMBus command to trigger the change of XN. DPWM3A is configured to GPIO, used to indicate
when the XN is rewritten.
Figure 2 shows the waveform. CH1 indicates the DPWM1A, which is controlled by Filter0; CH2
indicates the DPWM3A. After 3.5 ms of XN being written when DPWM3A turns low, the DPWM1A duty
finishes its change. This experiment indicates that, using the way of modifying XN, DPWM needs a
certain amount of time to complete its change.
UCD3138 Integral Branch of the PID Filter
3
SLUA729
Figure 2.
2.2
Change DPWM Duty by Modifying XN
Change DPWM Duty by Modifying KI_YN
Modifying KI_YN can rapidly change the DPWM duty.
Design an experiment to demonstrate. Run open-loop firmware, and write KI_YN directly. The firmware
design follows. The value of 0xd99039 is the corresponding value when XN is -30.
Figure 3 shows the waveform. CH1 indicates the DPWM1A, which is controlled by Filter0; CH2
indicates the DPWM3A. After KI_YN is written when DPWM3A turns low, the DPWM1A duty finishes its
change rapidly. This experiment indicates that, using the way of modifying KI_YN, DPWM duty can
rapidly complete its change.
4
UCD3138 Integral Branch of the PID Filter
SLUA729
Figure 3.
2.3
Change DPWM Duty by Modifying KI_YN
Pre-bias Design
If the output voltage is not 0 V when the power supply with synchronous rectification restarts, the prebias is essential. In the power supply based on UCD3138, the pre-bias can design by step and step as
below:
1. Acquire the current input voltage and output voltage.
2. Calculate the reference voltage, and then write this value to DAC_VALUE.
3. Calculate the integrator output value with DPWM duty, and then write it into KI_YN.
In the third step, we use the approach described in Section 2.2. The firmware design of the pre-bias
function follows.
Figure 4 shows the waveform. When the power supply restarts, the output voltage is 2.4 V. After softstart, the output arrives to its target value, 12 V. During this phase, there is no sharp dip at the output
voltage, which indicates the pre-bias works well.
UCD3138 Integral Branch of the PID Filter
5
SLUA729
Figure 4.
Soft-Start With Pre-bias
3
Stall Calculation of Integral Branch
3.1
Introduction
Stall calculation of integral branch means to freeze the integrator. Therefore, the value in KI_YN is
preserved. By setting KI_STALL to 1, this function is enabled, and disabled when KI_STALL is 0. Once
disable this function, the integral branch restarts its calculation with the preserved KI_YN value.
3.2
Demonstration
Design an experiment to demonstrate. Run open-loop firmware, and change XN from initial 100 to -30.
Before this change, enable the stall by writing 1 into KI_STALL.
Figure 5 shows the waveform. CH1 indicates the DPWM1A, which is controlled by Filter0; CH2
indicates the DPWM3A. After about 40 ms of XN being changed, the DPWM1A duty is still mainained.
Meanwhile, reading the KI_YN value with Memory Debugger, it shows this value does not change. This
unchanged value indicates that after enabling KI_STALL, the KI_YN is, indeed, preserved.
6
UCD3138 Integral Branch of the PID Filter
SLUA729
Figure 5.
DPWM Duty Change With Enabling Stall
Redesign the firmware, and add the code of setting KI_STALL to 0. This effort intends to check
whether or not the integral branch restarts its calculation value with the preserved value before.
Figure 6 shows the waveform. After approximately 3.5 ms of KI_STALL being set 0, when DPWM3A
turns high, the duty of DPWM1A changes. This indicates that the integrator restarts its calculation.
UCD3138 Integral Branch of the PID Filter
7
SLUA729
Figure 6.
4
Change of DPWM Duty After Disable Stall
Conclusion
Writing KI_YN directly, the DPWM duty can be changed rapidly. In some scenarios, this makes the
design more convenient, such as the pre-bias mentioned in this document.
Stall calculation of integral branch is a flexibility feature. This feature can be of great assistance to
designs which must preserve the KI_YN.
5
References
1.
2.
3.
4.
8
UCD3138 data sheet, Texas Instruments Inc., 2013
UCD3138 Digital Power Peripherals Programmer’s Manual, Texas Instruments Inc., 2013
UCD3138 ARM and Digital System Programmer’s Manual, Texas Instruments Inc., 2013
UCD3138 Monitoring and Communications Programmer’s Manual, Texas Instruments Inc., 2013
UCD3138 Integral Branch of the PID Filter
IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, enhancements, improvements and other
changes to its semiconductor products and services per JESD46, latest issue, and to discontinue any product or service per JESD48, latest
issue. Buyers should obtain the latest relevant information before placing orders and should verify that such information is current and
complete. All semiconductor products (also referred to herein as “components”) are sold subject to TI’s terms and conditions of sale
supplied at the time of order acknowledgment.
TI warrants performance of its components to the specifications applicable at the time of sale, in accordance with the warranty in TI’s terms
and conditions of sale of semiconductor products. Testing and other quality control techniques are used to the extent TI deems necessary
to support this warranty. Except where mandated by applicable law, testing of all parameters of each component is not necessarily
performed.
TI assumes no liability for applications assistance or the design of Buyers’ products. Buyers are responsible for their products and
applications using TI components. To minimize the risks associated with Buyers’ products and applications, Buyers should provide
adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, or
other intellectual property right relating to any combination, machine, or process in which TI components or services are used. Information
published by TI regarding third-party products or services does not constitute a license to use such products or services or a warranty or
endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the
third party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of significant portions of TI information in TI data books or data sheets is permissible only if reproduction is without alteration
and is accompanied by all associated warranties, conditions, limitations, and notices. TI is not responsible or liable for such altered
documentation. Information of third parties may be subject to additional restrictions.
Resale of TI components or services with statements different from or beyond the parameters stated by TI for that component or service
voids all express and any implied warranties for the associated TI component or service and is an unfair and deceptive business practice.
TI is not responsible or liable for any such statements.
Buyer acknowledges and agrees that it is solely responsible for compliance with all legal, regulatory and safety-related requirements
concerning its products, and any use of TI components in its applications, notwithstanding any applications-related information or support
that may be provided by TI. Buyer represents and agrees that it has all the necessary expertise to create and implement safeguards which
anticipate dangerous consequences of failures, monitor failures and their consequences, lessen the likelihood of failures that might cause
harm and take appropriate remedial actions. Buyer will fully indemnify TI and its representatives against any damages arising out of the use
of any TI components in safety-critical applications.
In some cases, TI components may be promoted specifically to facilitate safety-related applications. With such components, TI’s goal is to
help enable customers to design and create their own end-product solutions that meet applicable functional safety standards and
requirements. Nonetheless, such components are subject to these terms.
No TI components are authorized for use in FDA Class III (or similar life-critical medical equipment) unless authorized officers of the parties
have executed a special agreement specifically governing such use.
Only those TI components which TI has specifically designated as military grade or “enhanced plastic” are designed and intended for use in
military/aerospace applications or environments. Buyer acknowledges and agrees that any military or aerospace use of TI components
which have not been so designated is solely at the Buyer's risk, and that Buyer is solely responsible for compliance with all legal and
regulatory requirements in connection with such use.
TI has specifically designated certain components as meeting ISO/TS16949 requirements, mainly for automotive use. In any case of use of
non-designated products, TI will not be responsible for any failure to meet ISO/TS16949.
Products
Applications
Audio
www.ti.com/audio
Automotive and Transportation
www.ti.com/automotive
Amplifiers
amplifier.ti.com
Communications and Telecom
www.ti.com/communications
Data Converters
dataconverter.ti.com
Computers and Peripherals
www.ti.com/computers
DLP® Products
www.dlp.com
Consumer Electronics
www.ti.com/consumer-apps
DSP
dsp.ti.com
Energy and Lighting
www.ti.com/energy
Clocks and Timers
www.ti.com/clocks
Industrial
www.ti.com/industrial
Interface
interface.ti.com
Medical
www.ti.com/medical
Logic
logic.ti.com
Security
www.ti.com/security
Power Mgmt
power.ti.com
Space, Avionics and Defense
www.ti.com/space-avionics-defense
Microcontrollers
microcontroller.ti.com
Video and Imaging
www.ti.com/video
RFID
www.ti-rfid.com
OMAP Applications Processors
www.ti.com/omap
TI E2E Community
e2e.ti.com
Wireless Connectivity
www.ti.com/wirelessconnectivity
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2014, Texas Instruments Incorporated