Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
PID_Cntrl.h@0:4ed9a8952ddc, 2019-04-30 (annotated)
- Committer:
- altb2
- Date:
- Tue Apr 30 15:34:47 2019 +0000
- Revision:
- 0:4ed9a8952ddc
- Child:
- 1:314e2e3727f2
Musterloesung zu VC-Regler
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| altb2 | 0:4ed9a8952ddc | 1 | class PID_Cntrl |
| altb2 | 0:4ed9a8952ddc | 2 | { |
| altb2 | 0:4ed9a8952ddc | 3 | public: |
| altb2 | 0:4ed9a8952ddc | 4 | |
| altb2 | 0:4ed9a8952ddc | 5 | PID_Cntrl(float P, float I, float D, float tau_f, float Ts, float uMin, float uMax); |
| altb2 | 0:4ed9a8952ddc | 6 | |
| altb2 | 0:4ed9a8952ddc | 7 | float operator()(float error) { |
| altb2 | 0:4ed9a8952ddc | 8 | return doStep((double)error); |
| altb2 | 0:4ed9a8952ddc | 9 | } |
| altb2 | 0:4ed9a8952ddc | 10 | |
| altb2 | 0:4ed9a8952ddc | 11 | virtual ~PID_Cntrl(); |
| altb2 | 0:4ed9a8952ddc | 12 | |
| altb2 | 0:4ed9a8952ddc | 13 | void reset(float initValue); |
| altb2 | 0:4ed9a8952ddc | 14 | float doStep(double error); |
| altb2 | 0:4ed9a8952ddc | 15 | void set_limits(double ,double ); |
| altb2 | 0:4ed9a8952ddc | 16 | float get_ulimit(void); |
| altb2 | 0:4ed9a8952ddc | 17 | |
| altb2 | 0:4ed9a8952ddc | 18 | private: |
| altb2 | 0:4ed9a8952ddc | 19 | |
| altb2 | 0:4ed9a8952ddc | 20 | double Iold; |
| altb2 | 0:4ed9a8952ddc | 21 | double eold,yold,del; |
| altb2 | 0:4ed9a8952ddc | 22 | double uMax; |
| altb2 | 0:4ed9a8952ddc | 23 | double uMin; |
| altb2 | 0:4ed9a8952ddc | 24 | double Ts; |
| altb2 | 0:4ed9a8952ddc | 25 | double P,I,D; |
| altb2 | 0:4ed9a8952ddc | 26 | double p, Ka; |
| altb2 | 0:4ed9a8952ddc | 27 | void setCoefficients(float P, float I, float D, float tau_f, float Ts); |
| altb2 | 0:4ed9a8952ddc | 28 | |
| altb2 | 0:4ed9a8952ddc | 29 | }; |