Coder Social home page Coder Social logo

microchip-pic-avr-tools / powersmart-dcld Goto Github PK

View Code? Open in Web Editor NEW
14.0 11.0 4.0 246.19 MB

MPLAB® PowerSmart™ SDK - Digital Control Library Designer Configuration Tool & Code Generator

Home Page: https://microchip-pic-avr-tools.github.io/powersmart-dcld/

digital-signal-processing digital-power dspic dspic33 dspic33ep dspic33ck dspic33ch power-control power-converters power-supply

powersmart-dcld's People

Contributors

areiter128 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

powersmart-dcld's Issues

Add Spread Spectrum Modulation to Assembly Code Generation

  • Class: Feature Request
  • Complexity: Item
  • Priority: Medium

Spread Spectrum Modulation (SSM) is a highly efficient cycle-by-cycle PWM modulation technique used to efficiently spread the noise spectrum to improve EMC. It's commonly implemented by utilizing the LFSR register as pseudo random generator. The random number derived from this register is used as fractional factor which can be masked with user-defined bit masks to restrict the modulation range to a limited percentage ratio. This windowed modulation factor is then multiplied with all timing values (e.g. period, duty cycle, phase shifts, ADC trigger locations) simultaneously. As all target registers are known at runtime, SSM can be implemented as generic code block into the control loop assembly code to ensure most efficient execution.

Input Data Gain Accuracy Improvement

  • Class: Feature Request
  • Complexity: Story
  • Priority: Medium

Effective input data ranges may be very different from the definition range supported by DCLD today. For example, DCLD defines a Total Input Data Length, which is used for data normalization (e.g. 12-bit wide data). This defined range is internally assumed to define the total dynamic 0-100% visibility range of the real signal. However, in real-world designs the effective input signal dynamic range can be very different, resulting in deviations of the estimated input gain.

To optimize this gain accuracy, additional text boxes have to be added allowing users to specify min/max thresholds of the incoming data. the ratio between the real signal range and the given data length in [bit] then can be incorporated as input gain correction factor.

Real-Time Loop Tuning

  • Class: Feature Request
  • Complexity: Epic
  • Priority: Medium

DCLD should be enabled to communicate with the target device while executing the previously generated control loop, allowing to download new coefficients to be applied during runtime.
This feature may be restricted to modified pole- and zero locations only as controller type and code generation options require source code changes which can only be applied during compile time

#### Input Signal Rectification

  • Class: Feature Request
  • Complexity: Item
  • Priority: High

This feature request is an extension to the Input Signal Offset Compensation feature, where a control bit defined in the status word of the cNPNZ16b_t data object allows users to negate the input data signal. As a result, negative values will be fed as positive numbers into the compensation filter computation.

Example use case:

This feature is required to support bi-directional control systems. Bi-directional converters may have one current sense source where the zero point is offset by a certain voltage. Positive currents are defined as signals above this zero-line and negative currents are defined as signals below the zero line.
When using the Input Signal Offset Compensation feature only to account for input data gain correction, this would inevitably result in negative numbers being fed into the inverting control loop, effectively making the control loop non-inverting and therefore nonfunctional.

C-Code Template Script

  • Class: Feature Request
  • Complexity: Epic
  • Priority: Medium

Outsource C-code templates to external script file to allow users to modify/manipulate generated C-source and C-header file contents.

#### Input Singal Offset Compensation

  • Class: Feature Enhancement
  • Complexity: Item
  • Priority: High

DCLD supports input offset compensation since version 0.9.60. The implementation subtracted a user defined value from the incoming data before processing its value through the compensator code module. The original implementation assumed the user-defined threshold to be an absolute zero line. Thus all negative result of the offset compensation computation got cut off and auto-zero'ed.
During practical applications it turned out, that this has a high potential risk of injecting growing offsets into the control loop integrator when the real offset defines from the user-defined level.

The offset compensation therefore needs to be reworked to allow dynamically changing offset levels above and below the user-defined center line.

Add Option to Reduce Numerical Error In Compensator Output

For some values of compensator coefficients, typically when the frequencies of the poles and zeros are small compared to the sampling frequency, there is significant numerical error in the compensator output, which leads to a failure to integrate the error for small error values and an offset in the controller.

The root cause is that the sum of the X terms is smaller than one bit, so the error fails to integrate between updates in the compensator.

It would be useful if the software checked the coefficients for these issues and warned the user, similar to how it checks for numerical error in the coefficients themselves.

Additionally, if the lower 16 bits of the Y terms are stored and used in the calculations of future Y terms this issue would be greatly reduced/eliminated. Doing so should only take ~3 instructions per Y term in the compensator and would be a very useful software option.

MPLAB X Project Assignment

  • Class: Feature Enhancement
  • Complexity: Item
  • Priority: High

When DCLD configuration files are saved to the MPLAB X project folder, relative path inclusions in source file are automatically correct and no compiler conflicts occur. However, when the DCLD configuration is stored in some other place and relative paths are used in file inclusions or by the code generator, conflicts might occur between C-Compiler and DCLD- generated header file paths. A reference to the MPLAB X project in which the generated files are used would solve the problems.

Add Adaptive Gain Modulation (AGM)

  • Class: Feature Request
  • Complexity: Epic
  • Priority: Medium

Adaptive Gain Modulation (AGM) is a specific implementation allowing to modulate the integrator gain of the feedback loop during runtime on a cycle-by-cycle basis. the gain modulation can be based on different, physical factors. deriving these factors still needs to be done in user code. However, to allow users to apply gain modulation schemes, a defined access point inside the compensator code is required. This modulation factor is a simple 16-bit number which is multiplied on the recent result of the filter B-term before it is accumulated to the filter A term.

This feature might be enhanced by adding pre-defined modulation factor determination such as volt-second ratios (voltage across inductor), which would apply to all forward converter types and work as an enhanced feed-forward term responding to both ends of the converter (input as well as output voltage transients/variations)

Add XML Support

  • Class: Feature Request
  • Complexity: Epic
  • Priority: Medium

For better support of MPLAB X embedded XML support is required allowing DCLD to directly read from and write to the configurations.xml and project.xml files used by MPLAB X. These files allow DCLD to read the recently selected dsPIC device type, which can be used to better tailor code generation options, as well as adding newly generated files to an existing MPLAB X project automatically.

#### Settings History

  • Class: Feature Request
  • Complexity: Story
  • Priority: Medium

DCLD should offer the option to save the history of settings which got generated in the past. This would be very useful while tuning/optimizing control systems on the bench. Different settings would have to be evaluated and different evaluations would have to be compared, which requires to step back and forth through different combinations of settings. Having a list of previously used settings, allowing users to simply step through the output history with a mouse click would be very valuable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.