Articles / Example of development project for PC-controller in the EAT-Eclipse
Software and hardware for industrial automation company MIKONT Ltd allow you to implement solutions for various tasks of control and monitoring of industrial processes. The basis of the hardware is a PC-controllers and controllers based on Atmel AVR.
Software support is provided by tool for development of the embedded application - EAT-Eclipse.
This article describes the process of creating a real project for power quality analyzer. This is necessary to study the mains in order to optimize the choice of reactive power compensation and filtering of higher harmonics the current.
Power analyzer shall perform the following functions:
- Measurement of voltage and current for the two phases of the power
- Calculation of active and total power
- Calculation of the higher harmonic of the voltage for the two phases of the power
- Accumulation and preservation of the history of measured and calculated values for the electrical parameters specified period of time
So, to create a power analyzer, we need:
- Industrial PC-controller MIK-08 - C1101 processor module
- Sensor modules for measurement of current / voltage - S0501
- Shunts
- Power supply for the controller and sensor modules with an output voltage of 24 V
- Circuit breakers and terminal blocks.
To configure the analyzer need to control terminal T0601 or programm emulator. To create software project need development environment of embedded applications EAT-Eclipse.
Fig.1. Power analyzer
The process of creating a software project in the development environment EAT-Eclipse consists of the create and editing schema interconnected functional blocks in the graphical editor. Implementation in the scheme the work logic of the controller, the binding elements of the circuit to the controller hardware and communication protocols, and configuring the monitoring system. The monitoring system will used for accumulation and preservation of data for further analysis of the quality of power supply.
Fig.2. Signal normalizations
Necessary elements selected in the library of functional blocks and transferred to the chart and interconnected. Figure 2 shows the normalization signals circuit from voltage sensors and current sensors (blocks Ain3, Ain1_2), here introduced bias and scale factor (blocks Ain3_shift, Ain3_koef). At points U_1 and I_1 will be formed respectively the instantaneous values of voltage and current for the first phase.
Fig.3. Calculation of active power
Figure 3 shows the scheme of calculating the active power on the instantaneous values of voltages and currents of the two phases, and the scaling factor is added to the output.
Fig.4. Fourier transform blocks
The figure 4 shows a part of the total power calculation circuit based on the intermediate results obtained in the other sections of the chart. Also shown are the blocks of the discrete Fourier transform - DTF, taken from a library of signal processing blocks (Signal Processing / Discrete Fourier Transforms F4). These blocks are used to calculate the harmonic content of the input signal and out the values for the odd harmonics from the third to the twenty-first in the parts of the first harmonic.
After you create a schema, you need bind it to the hardware controller.
Fig.5. Binding to the ADC
Figure 5 shows the process of creating a reference to the circuit element - variable, in the analog-to-digital (ADC) converter of controller. This ADC channel is selected for voltage measurement of the first phase. Creating this binding will transmit data from the ADC circuit blocks through said element - Ain3. Likewise for the other involved ADC channels creates bindings to appropriate circuit blocks of analyzer.
Fig.6. Configuring the monitoring system Trace
Next, configure the monitoring system Trace, which will be used for storing data analyzer.
Create three groups for data of different nature:
- Raw group to save the instantaneous values of currents and voltages for the two phases.
- Power group to save the values of active and apparent power.
- Spectr group to save data on harmonic composition voltages of the two phases.
Create bindings for system monitoring.
Fig.7. Configuring the network
The last step in the creation of the project - a description of the communication properties of controller. In this project it is necessary to provide access to the blocks of the shift and scale voltages and currents, as well as output voltage and current values of two phases of the power. Using the control terminal, we can configure the normalization of the circuit voltage and current signals.
The project is completed. Make the automatic generation of source files in C language and compile them. Eventually resulting executable file is copied to the controller.
After installation and enable a test bed for analyzer, monitoring system data files were obtained. For information visualization of the power analyzer is used TraceViewer program.
Fig.8. Graphs of voltage and current
Figure 8 shows graphs of voltage and current of the first phase of the power (U1, I1). Current with distortion (green line), and voltage with very small distortion (red graph).
What level of harmonics shows the Fourier transform?
Fig.9. Graphs of active and total power
Figure 9 shows graphs of the active (red) and total (green) output. On the test bench, we used a resistive load, so the active power is almost completely determines the total power, reactive power is very low.
Fig.10. Harmonic composition of voltage
And finally, the harmonic composition of the voltage. As you can see the most important is the fifth harmonic (green) - about 0.8% of the fundamental harmonic, then third harmonic (red) - about 0.4%, the seventh (blue) and ninth (blue) harmonic at approximately 0, 3 ÷ 0,2%.
Like the example set out the possible realization of a wide range of industrial automation: automation systems, process control systems, alarm and event recorders. In addition, the IDE provides solutions for create control systems of voltage conversion devices. IDE EAT-Eclipse focuses on the domain experts - engineers of industrial automation, specialists in power conversion equipment, etc., do not have programming skills.
October 6, 2011 10:10 •