-
Notifications
You must be signed in to change notification settings - Fork 24
/
adrc.h
77 lines (68 loc) · 1.4 KB
/
adrc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
* File : adrc.h
*
*
* Change Logs:
* Date Author Notes
* 2018-03-18 zoujiachi the first version
*/
#ifndef __ADRC_H__
#define __ADRC_H__
typedef struct
{
float v1;
float v2;
float r2;
float h2;
float h;
}TD_Controller_Def;
typedef struct
{
float v1;
float v2;
float r0;
float h0;
float h;
}ADRC_TD_Def;
typedef struct
{
float h;
float beta1;
float beta2;
float alpha;
float delta;
float u;
float b0;
/* ESO */
float z1;
float z2;
}ADRC_ESO_Def;
typedef struct
{
float h;
float beta1;
float beta2;
float u;
float b0;
/* LESO */
float z1;
float z2;
}ADRC_LESO_Def; /* Linear ESO */
typedef struct
{
float h;
float h1;
float r1;
float c;
}ADRC_NLSEF_Def;
void adrc_td_init(ADRC_TD_Def* td_t, float h, float r0, float h0);
void adrc_td(ADRC_TD_Def* td, float v);
void adrc_td_control_init(TD_Controller_Def* td_controller, float h, float r2, float h2);
float adrc_td_control(TD_Controller_Def* td_controller, float err);
void adrc_eso_init(ADRC_ESO_Def* eso_t, float h, float beta1, float beta2, float alpha, float delta, float b0);
void adrc_eso(ADRC_ESO_Def* eso_t, float y);
void adrc_leso_init(ADRC_LESO_Def* leso_t, float h, float w, float b0);
void adrc_leso(ADRC_LESO_Def* leso_t, float y);
void adrc_nlsef_init(ADRC_NLSEF_Def* nlsef_t, float h, float r1, float h1, float c);
float adrc_nlsef(ADRC_NLSEF_Def* nlsef_t, float e1, float e2);
#endif