Transition to Digital: Number Crunching

A Digital Signal Controller (DSC) is a single-chip, embedded controller that seamlessly integrates the control attributes of a Microcontroller (MCU) with the computational and throughput capabilities of a Digital Signal Processor (DSP) in a single core.

The dsPIC® DSC balances its outstanding MCU qualities with real DSP performance using numbers to represent physical values.

There are both advantages and disadvantages to using numbers.

  • Advantages: The system can directly operate on the equations that describe the system functionality. This allows power conversion designers to use different control techniques, topologies, and modes without the need to change anything on the board, i.e., increased flexibility.
  • Disadvantages: Care must be taken in using numbers because precision is not infinite (in loop controllers, fixed-point mathematics is used). The consequence of this is that overflow may be generated. Secondly, a finite interval of time is required for the unit to compute the output although it's also true that the output is generated with delay in the analog domain within the loop, e.g., from the compensator.

There are a number of different approaches that can be used to design the digital equivalent of the analog compensator (controller).

compensator.png
Figure 1

In the digital domain, it is possible to implement control techniques that are not possible to implement in the analog domain. For example:

  • Direct transformation of the analog compensator transfer function to the digital version
  • Proportional, Integral, Derivative (PID) approach
  • State variable approach
  • Direct digital synthesis
  • Non-linear controllers

The next section focuses on using PID controller to describe how dsPIC DSC number crunching can be used in power conversion applications.

PID

The PID controller is commonly used in the control loops of industrial processes. Its parameters need to be adjusted as a function of the control process and remain unchanged during normal operations. See Figure 2.

PID.png
Figure 2

The following is the PID equation, where e(t) is the error of the system; Ts is the signal sampling period (instantaneous time) and Kp, Ki and Kd are the PID controller gains.

PID-equation.png
Figure 3

Figure 3 demonstrates that PID requires numerous calculations and constant parameter adjustments during operation. The dsPIC DSC's DSP engine allows fast math operations with the following features:

  • High-speed 17-bit by 17-bit multiplier
  • Barrel shifter
  • 40-bit adder/subtractor
  • Two target accumulator registers
  • Rounding logic with selectable modes
  • Saturation logic with selectable modes
© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.