Git Product home page Git Product logo

pfcontroller's Introduction

PFController

PFC - power factor correction (controller). Firmware is intended to run as three-phase inverter with the load balancing.

Folder structure

  • /models folder contains Matlab 2018b+ Simulink model of the PFC
  • /firmware folder contains a project in Keil uVision 5 for the STM32F7
  • /terminal_app folder contains a project in Qt Creator 4+ with the control application

Algorithm

The Matlab Simulink model is based on the "Three Phase Sinosoidal PWM based Rectifier" by Syed Abdul Rahman Kashif The control logic was changed, and additional processing has been added.

The device produces the constant (rectified) output voltage (700-800V) from three phase grid voltage 380V. The input current flow follows the shape of the voltage, thus the device imitates a linear load. Working in this way helps to reduce EMI and extends the lifespan of industrial networks. The Total harmonic distortion (THD) is calculated to control the linearity of the load.

Simulink model Fig.1. Simulink model

The current at each phase is created by means of IGBT half bridges which are controlled by a PWM signal. To calculate the shape of the PWM signal internal sinusoidal generator is used. The generator output is shifted and matches each voltage phase (0, 2*pi/3, 4*pi/3). Additional phase shift is added to take into acount the inductive nature of the circuit. Then the different between the input voltage and the generator output is multiplied by the inflation factor. The inflation factor is calculated as an output of a PID controlled, which inputs are the current voltage at the output capacitor, and the desired output voltage.

As a result, the PWM signal for each phase represents the amount of power should be taken from the grid to charge the output capacitor (or to supply an output load).

The result of the model can be seen in Fig.2-3. The time interval 0..1s represents output capacitor charging. At 1s time a 20 Ohm load is connected to the output. 1..2s interval shows transition processes.

Voltage and current Fig.2. Voltage and current

Input currents Fig.3. Input currents

Firmware

The firmware v0.1.1 implement the PFC operation and a load control.

Requirements

Keil uVision was used as a development IDE. The firmware was tested with the following software and toolckain versions:

IDE-Version: µVision V5.28.0.0

Toolchain: MDK-ARM Professional Version: 5.28.0.0

C Compiler: V5.06 update 6 (build 750)

Dependencies

TODO


NOTE

The firmware is in the development. Using it without additional testing in a real network can be dangerous. The parameters and settings should be analysed and corrected for each hardware.


Future improvements to make:

  • Add temperature measurement
  • Add ventilators control
  • Add locks for settings, ADC, PFC logic modules
  • Add automatic start
  • Add extra configuration from the panel (remove defines)
  • Add phase rotation check

Documentation

The code contains documentation in Doxygen style. The folder docs contains firmware/doxygen_cfg file that can be used to generate the documentation:

docs > doxygen doxygen_сfg

The documentation will be generated under the folder:

firmware/docs/html

To view the documentation open the following file in the browser:

firmware/docs/html/index.html

Code format

Clang-format was used to prettify the code. The configuration can be found in .clang-format file.

Hardware

The firmware was tested on the development board for STM32F765 (with modifications) and on a custom hardware. Changes should be made before portion to the different hardware. The hardware description is defined mostly in the board_stm32f7.h file.

Control software


NOTE

Work in progress


Requirements

The project was developed in Qt Creator 4.9.0. Qt 5.12.2 (MSVC 2017, 32 bit) framework was used.

Dependencies

pfcontroller's People

Contributors

stankarpikov avatar

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.