1-phase PV router
Loading...
Searching...
No Matches
calibration.h
Go to the documentation of this file.
1
11
12#ifndef CALIBRATION_H
13#define CALIBRATION_H
14
15#include "config.h"
16
17//
18// Calibration values
19//-------------------
20// Three calibration values are used in this sketch: f_powerCal, f_phaseCal and f_voltageCal.
21// With most hardware, the default values are likely to work fine without
22// need for change. A compact explanation of each of these values now follows:
23
24// When calculating real power, which is what this code does, the individual
25// conversion rates for voltage and current are not of importance. It is
26// only the conversion rate for POWER which is important. This is the
27// product of the individual conversion rates for voltage and current. It
28// therefore has the units of ADC-steps squared per Watt. Most systems will
29// have a power conversion rate of around 20 (ADC-steps squared per Watt).
30//
31// powerCal is the RECIPROCAL of the power conversion rate. A good value
32// to start with is therefore 1/20 = 0.05 (Watts per ADC-step squared)
33//
34inline constexpr float powerCal_grid{ 0.0436f }; // for CT1
35inline constexpr float powerCal_diverted{ 0.04446f }; // for CT2
36
37inline constexpr float f_voltageCal{ 0.805653f };
38
39inline constexpr float lpf_gain{ 9 };
40inline constexpr float alpha{ 0.0011 };
41
42//--------------------------------------------------------------------------------------------------
43
44#endif /* CALIBRATION_H */
constexpr float alpha
Definition calibration.h:40
constexpr float lpf_gain
Definition calibration.h:39
constexpr float f_voltageCal
Definition calibration.h:37
constexpr float powerCal_grid
Definition calibration.h:34
constexpr float powerCal_diverted
Definition calibration.h:35
Configuration values to be set by the end-user.