Skip to content

Commit 916cb4d

Browse files
committed
README layout fix again
1 parent 554e762 commit 916cb4d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,26 +563,40 @@ In order to get optimal performance you will have to fiddle a bit with with the
563563

564564
#### Control theory lovers corner :D
565565
Transfer funciton of the PI contorller this library implements is:
566+
566567
<p><img src="./extras/Images/cont_PI.png" /></p>
568+
567569
Continiuos PI is discretized using Tustin transform. The final discrete equation becomes:
570+
568571
<p><img src="./extras/Images/dis_PI.png" /></p>
572+
569573
Where the <i>u(k)</i> is the control signal (voltage <i>U<sub>q</sub></i> in our case) in moment <i>k</i>, <i>e(k),e(k-1)</i> is the tracking error in current moment <i>k</i> and previous step <i>k-1</i>. Tracking error presents the difference in between the target velocity value <i>v<sub>d</sub></i> and measured velocity <i>v</i>.
574+
570575
<p><img src="./extras/Images/track.png" /></p>
571576

572577
Transfer funciton of the Low pass filter is contorller is:
578+
573579
<p><img src="./extras/Images/cont_LPF.png" /></p>
574580
In it discrete form it becomes:
581+
575582
<p><img src="./extras/Images/dis_LPF.png" /></p>
583+
576584
where <i>v<sub>f</sub>(k)</i> is filtered velocity value in moment <i>k</i>, <i>v(k)</i> is the measured velocity in the moment <i>k</i>, <i>T<sub>f</sub></i> is the filter time constant and <i>T<sub>s</sub></i> is the sampling time (or time in between executions of the equation).
577585
This low pass filter can be also written in the form:
586+
578587
<p><img src="./extras/Images/LPF_alpha.png" /></p>
588+
579589
where:
590+
580591
<p><img src="./extras/Images/alpha.png" /></p>
592+
581593
This makes it a bit more clear what the time constat `Tf` of the Low pass filter stands for. If your sample time is around 1millisecond (for arduino UNO this can be taken as an average) then setting the
582594
`Tf` value to `Tf = 0.01` will result in:
595+
583596
```cpp
584597
alpha = 0.01/(0.01 + 0.001) = 0.91
585598
```
599+
586600
Which means that your actual velocity measurement <i>v</i> will influence the filtered value <i>v<sub>f</sub><i> with the coeficient `1-alpha = 0.09` which is going to smooth the velocity values considerably (maybe even too muuch, depends of the application).
587601

588602

0 commit comments

Comments
 (0)