Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OPALIB Control PID
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OwnTech
Power API
OPALIB Control PID
Commits
58adb4cd
Commit
58adb4cd
authored
3 years ago
by
Luiz-Fernando Lavado-Villa
Browse files
Options
Downloads
Patches
Plain Diff
Updated some bugs on the library concerning the saturation value
parent
2b60bf58
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/opalib_control_pid.c
+5
-2
5 additions, 2 deletions
src/opalib_control_pid.c
with
5 additions
and
2 deletions
src/opalib_control_pid.c
+
5
−
2
View file @
58adb4cd
...
@@ -117,6 +117,7 @@ void opalib_control_init_interleaved_pid(float32_t kp, float32_t ki, float32_t k
...
@@ -117,6 +117,7 @@ void opalib_control_init_interleaved_pid(float32_t kp, float32_t ki, float32_t k
PID_variables
.
Kd
=
kd
;
PID_variables
.
Kd
=
kd
;
arm_pid_init_f32
(
&
PID_variables
,
1
);
arm_pid_init_f32
(
&
PID_variables
,
1
);
saturation_interleaved
=
VMAX
;
}
}
...
@@ -124,7 +125,7 @@ void opalib_control_init_interleaved_pid(float32_t kp, float32_t ki, float32_t k
...
@@ -124,7 +125,7 @@ void opalib_control_init_interleaved_pid(float32_t kp, float32_t ki, float32_t k
* This function initializes all the parameters
* This function initializes all the parameters
* needed for the PID calculation for the buck topology
* needed for the PID calculation for the buck topology
*/
*/
void
opalib_
power_conversion_init_leg1_pid
(
bool
leg1_buck_mode
,
float32_t
vref
,
float32_t
kp
,
float32_t
ki
,
float32_t
kd
,
uint32_t
task_period_us
)
void
opalib_
control_init_leg1_pid
(
float32_t
kp
,
float32_t
ki
,
float32_t
kd
,
uint32_t
task_period_us
)
{
{
pid_period_us
=
task_period_us
;
pid_period_us
=
task_period_us
;
...
@@ -134,6 +135,7 @@ void opalib_power_conversion_init_leg1_pid(bool leg1_buck_mode, float32_t vref,
...
@@ -134,6 +135,7 @@ void opalib_power_conversion_init_leg1_pid(bool leg1_buck_mode, float32_t vref,
PID_1_variables
.
Kd
=
kd
;
PID_1_variables
.
Kd
=
kd
;
arm_pid_init_f32
(
&
PID_1_variables
,
1
);
arm_pid_init_f32
(
&
PID_1_variables
,
1
);
saturation_leg1
=
VMAX
;
}
}
...
@@ -141,7 +143,7 @@ void opalib_power_conversion_init_leg1_pid(bool leg1_buck_mode, float32_t vref,
...
@@ -141,7 +143,7 @@ void opalib_power_conversion_init_leg1_pid(bool leg1_buck_mode, float32_t vref,
* This function initializes all the parameters
* This function initializes all the parameters
* needed for the PID calculation for the buck topology
* needed for the PID calculation for the buck topology
*/
*/
void
opalib_
power_conversion_init_leg2
(
float32_t
vref
,
float32_t
kp
,
float32_t
ki
,
float32_t
kd
,
uint32_t
task_period_us
)
void
opalib_
control_init_leg2
(
float32_t
kp
,
float32_t
ki
,
float32_t
kd
,
uint32_t
task_period_us
)
{
{
pid_period_us
=
task_period_us
;
pid_period_us
=
task_period_us
;
...
@@ -151,6 +153,7 @@ void opalib_power_conversion_init_leg2(float32_t vref, float32_t kp, float32_t k
...
@@ -151,6 +153,7 @@ void opalib_power_conversion_init_leg2(float32_t vref, float32_t kp, float32_t k
PID_2_variables
.
Kd
=
kd
;
PID_2_variables
.
Kd
=
kd
;
arm_pid_init_f32
(
&
PID_2_variables
,
1
);
arm_pid_init_f32
(
&
PID_2_variables
,
1
);
saturation_leg2
=
VMAX
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment