-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ 4faaae7 🚀
- Loading branch information
Showing
683 changed files
with
3,928 additions
and
4,687 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,11 +69,21 @@ | |
<div class="title">calibration.h</div> </div> | ||
</div><!--header--> | ||
<div class="contents"> | ||
<a href="calibration_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>  </div> | ||
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#ifndef _CALIBRATION_H</span></div> | ||
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#define _CALIBRATION_H</span></div> | ||
<a href="calibration_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/**</span></div> | ||
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * @file calibration.h</span></div> | ||
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * @author Frédéric Metrich ([email protected])</span></div> | ||
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * @brief Calibration values definition</span></div> | ||
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * @version 0.1</span></div> | ||
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * @date 2021-10-04</span></div> | ||
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> *</span></div> | ||
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * @copyright Copyright (c) 2023</span></div> | ||
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> *</span></div> | ||
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> */</span></div> | ||
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>  </div> | ||
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#</span><span class="preprocessor">ifndef</span> <span class="preprocessor">_CALIBRATION_H</span></div> | ||
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#</span><span class="preprocessor">define</span> <span class="preprocessor">_CALIBRATION_H</span></div> | ||
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>  </div> | ||
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#include "<a class="code" href="config_8h.html">config.h</a>"</span></div> | ||
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#</span><span class="preprocessor">include</span> <a class="code" href="config_8h.html" title="Configuration values to be set by the end-user.">"config.h"</a></div> | ||
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>  </div> | ||
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment">//</span></div> | ||
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment">// Calibration values</span></div> | ||
|
@@ -92,7 +102,7 @@ | |
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment">// powerCal is the RECIPROCAL of the power conversion rate. A good value</span></div> | ||
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment">// to start with is therefore 1/20 = 0.05 (Watts per ADC-step squared)</span></div> | ||
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="comment">//</span></div> | ||
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="calibration_8h.html#aa04530439c9232df689568f4a6cd64d9"> 34</a></span> <span class="keyword">inline</span> constexpr <span class="keywordtype">float</span> <a class="code" href="calibration_8h.html#aa04530439c9232df689568f4a6cd64d9">f_powerCal</a>[<a class="code" href="config__system_8h.html#ac17be2735ad17e6198cd2a24eb39eb91">NO_OF_PHASES</a>]{ 0.05000F, 0.05000F, 0.05000F };</div> | ||
<div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="calibration_8h.html#aa04530439c9232df689568f4a6cd64d9"> 34</a></span> <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keywordtype">float</span> <a class="code" href="calibration_8h.html#aa04530439c9232df689568f4a6cd64d9">f_powerCal</a>[NO_OF_PHASES]{ 0.05000F, 0.05000F, 0.05000F };</div> | ||
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="comment">//</span></div> | ||
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment">// f_phaseCal is used to alter the phase of the voltage waveform relative to the current waveform.</span></div> | ||
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="comment">// The algorithm interpolates between the most recent pair of voltage samples according to the value of f_phaseCal.</span></div> | ||
|
@@ -104,24 +114,18 @@ | |
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="comment">// NB. Any tool which determines the optimal value of f_phaseCal must have a similar</span></div> | ||
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="comment">// scheme for taking sample values as does this sketch.</span></div> | ||
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="comment">//</span></div> | ||
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="calibration_8h.html#a1d63b22231b730d0f9d9fd4971a0fd35"> 46</a></span> <span class="keyword">inline</span> constexpr <span class="keywordtype">float</span> <a class="code" href="calibration_8h.html#a1d63b22231b730d0f9d9fd4971a0fd35">f_phaseCal</a>{ 1 }; </div> | ||
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="calibration_8h.html#a1d63b22231b730d0f9d9fd4971a0fd35"> 46</a></span> <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keywordtype">float</span> <a class="code" href="calibration_8h.html#a1d63b22231b730d0f9d9fd4971a0fd35">f_phaseCal</a>{ 1 }; <span class="comment">/**< Nominal values only */</span></div> | ||
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="comment">//</span></div> | ||
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="comment">// For datalogging purposes, f_voltageCal has been added too. Because the range of ADC values is</span></div> | ||
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="comment">// similar to the actual range of volts, the optimal value for this cal factor is likely to be</span></div> | ||
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="comment">// close to unity.</span></div> | ||
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="calibration_8h.html#a4c3b8983185a9bc5d78bcd2cccbac15d"> 51</a></span> <span class="keyword">inline</span> constexpr <span class="keywordtype">float</span> <a class="code" href="calibration_8h.html#a4c3b8983185a9bc5d78bcd2cccbac15d">f_voltageCal</a>[<a class="code" href="config__system_8h.html#ac17be2735ad17e6198cd2a24eb39eb91">NO_OF_PHASES</a>]{ 0.8151F, 0.8184F, 0.8195F }; </div> | ||
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="calibration_8h.html#a74d2e520152cb559bdb6e18153dcb5e4"> 53</a></span> <span class="keyword">inline</span> constexpr <span class="keywordtype">float</span> <a class="code" href="calibration_8h.html#a74d2e520152cb559bdb6e18153dcb5e4">lpf_gain</a>{ 0 }; </div> | ||
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="calibration_8h.html#a19b3d4f09bab83f43bd3a3ed5295bddb"> 54</a></span> <span class="keyword">inline</span> constexpr <span class="keywordtype">float</span> <a class="code" href="calibration_8h.html#a19b3d4f09bab83f43bd3a3ed5295bddb">alpha</a>{ 0.002 };</div> | ||
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="calibration_8h.html#a4c3b8983185a9bc5d78bcd2cccbac15d"> 51</a></span> <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keywordtype">float</span> <a class="code" href="calibration_8h.html#a4c3b8983185a9bc5d78bcd2cccbac15d">f_voltageCal</a>[NO_OF_PHASES]{ 0.8151F, 0.8184F, 0.8195F }; <span class="comment">/**< compared with Sentron PAC 4200 */</span></div> | ||
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  </div> | ||
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="calibration_8h.html#a74d2e520152cb559bdb6e18153dcb5e4"> 53</a></span> <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keywordtype">float</span> <a class="code" href="calibration_8h.html#a74d2e520152cb559bdb6e18153dcb5e4">lpf_gain</a>{ 0 }; <span class="comment">/**< setting this to 0 disables this extra processing */</span></div> | ||
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="calibration_8h.html#a19b3d4f09bab83f43bd3a3ed5295bddb"> 54</a></span> <span class="keyword">inline</span> <span class="keyword">constexpr</span> <span class="keywordtype">float</span> <a class="code" href="calibration_8h.html#a19b3d4f09bab83f43bd3a3ed5295bddb">alpha</a>{ 0.002 };</div> | ||
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="comment">//--------------------------------------------------------------------------------------------------</span></div> | ||
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  </div> | ||
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="preprocessor">#endif </span><span class="comment">// _CALIBRATION_H</span></div> | ||
<div class="ttc" id="acalibration_8h_html_a19b3d4f09bab83f43bd3a3ed5295bddb"><div class="ttname"><a href="calibration_8h.html#a19b3d4f09bab83f43bd3a3ed5295bddb">alpha</a></div><div class="ttdeci">constexpr float alpha</div><div class="ttdef"><b>Definition:</b> <a href="calibration_8h_source.html#l00054">calibration.h:54</a></div></div> | ||
<div class="ttc" id="acalibration_8h_html_a1d63b22231b730d0f9d9fd4971a0fd35"><div class="ttname"><a href="calibration_8h.html#a1d63b22231b730d0f9d9fd4971a0fd35">f_phaseCal</a></div><div class="ttdeci">constexpr float f_phaseCal</div><div class="ttdef"><b>Definition:</b> <a href="calibration_8h_source.html#l00046">calibration.h:46</a></div></div> | ||
<div class="ttc" id="acalibration_8h_html_a4c3b8983185a9bc5d78bcd2cccbac15d"><div class="ttname"><a href="calibration_8h.html#a4c3b8983185a9bc5d78bcd2cccbac15d">f_voltageCal</a></div><div class="ttdeci">constexpr float f_voltageCal[NO_OF_PHASES]</div><div class="ttdef"><b>Definition:</b> <a href="calibration_8h_source.html#l00051">calibration.h:51</a></div></div> | ||
<div class="ttc" id="acalibration_8h_html_a74d2e520152cb559bdb6e18153dcb5e4"><div class="ttname"><a href="calibration_8h.html#a74d2e520152cb559bdb6e18153dcb5e4">lpf_gain</a></div><div class="ttdeci">constexpr float lpf_gain</div><div class="ttdef"><b>Definition:</b> <a href="calibration_8h_source.html#l00053">calibration.h:53</a></div></div> | ||
<div class="ttc" id="acalibration_8h_html_aa04530439c9232df689568f4a6cd64d9"><div class="ttname"><a href="calibration_8h.html#aa04530439c9232df689568f4a6cd64d9">f_powerCal</a></div><div class="ttdeci">constexpr float f_powerCal[NO_OF_PHASES]</div><div class="ttdef"><b>Definition:</b> <a href="calibration_8h_source.html#l00034">calibration.h:34</a></div></div> | ||
<div class="ttc" id="aconfig_8h_html"><div class="ttname"><a href="config_8h.html">config.h</a></div><div class="ttdoc">Configuration values to be set by the end-user.</div></div> | ||
<div class="ttc" id="aconfig__system_8h_html_ac17be2735ad17e6198cd2a24eb39eb91"><div class="ttname"><a href="config__system_8h.html#ac17be2735ad17e6198cd2a24eb39eb91">NO_OF_PHASES</a></div><div class="ttdeci">constexpr uint8_t NO_OF_PHASES</div><div class="ttdef"><b>Definition:</b> <a href="config__system_8h_source.html#l00019">config_system.h:19</a></div></div> | ||
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="preprocessor">#</span><span class="preprocessor">endif</span> <span class="comment">// _CALIBRATION_H</span></div> | ||
</div><!-- fragment --></div><!-- contents --> | ||
<!-- start footer part --> | ||
<hr class="footer"/><address class="footer"><small> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<map id="EWMA_average< A >" name="EWMA_average< A >"> | ||
<area shape="rect" id="node1" title="Exponentially Weighted Moving Average." alt="" coords="49,5,211,32"/> | ||
<area shape="rect" id="node2" href="$classEWMA__average.html" title=" " alt="" coords="5,109,255,151"/> | ||
</map> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
49d9f6000ff4926031246ded3b8d4ac6 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions
4
classEWMA__average_a208b9b3d82809466b4d90aedb3c7e4db_cgraph.map
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
classEWMA__average_a208b9b3d82809466b4d90aedb3c7e4db_cgraph.md5
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.