Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
opalib_pid_voltage
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
Jean Alinei
opalib_pid_voltage
Commits
4605c1cb
Commit
4605c1cb
authored
3 years ago
by
Jean Alinei
Browse files
Options
Downloads
Patches
Plain Diff
Added Start/stop function to stop the power flow.
parent
c0075d08
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/opalib_pid_voltage.c
+12
-7
12 additions, 7 deletions
src/opalib_pid_voltage.c
src/opalib_pid_voltage.h
+13
-8
13 additions, 8 deletions
src/opalib_pid_voltage.h
with
25 additions
and
15 deletions
src/opalib_pid_voltage.c
+
12
−
7
View file @
4605c1cb
...
...
@@ -169,17 +169,12 @@ void opalib_pid_voltage_init_boost(float32_t vref, float32_t kp, float32_t ki, f
data_acquisition_start
();
}
/**
* DEPRECATED - This function update the voltage reference of the
* control task.
*/
void
opalib_pid_
update_voltage_reference
(
float32_t
vref
)
void
opalib_pid_
reset_state
(
)
{
Vref
=
vref
;
arm_pid_reset_f32
(
&
PID_variables
)
;
}
/**
* This function does the PID calculation
* The PID has an anti-windup that permits to avoid
...
...
@@ -340,4 +335,14 @@ void opalib_pid_voltage_stop()
{
leg_stop
(
TIMA
);
leg_stop
(
TIMB
);
}
/**
* This stops the converter by putting both timing
* units outputs low
*/
void
opalib_pid_voltage_start
()
{
leg_start
(
TIMA
);
leg_start
(
TIMB
);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/opalib_pid_voltage.h
+
13
−
8
View file @
4605c1cb
...
...
@@ -53,14 +53,6 @@ void opalib_pid_voltage_init_buck(float32_t vref, float32_t kp, float32_t ki, fl
*/
void
opalib_pid_voltage_init_boost
(
float32_t
vref
,
float32_t
kp
,
float32_t
ki
,
float32_t
kd
,
uint32_t
task_period_us
);
/**
* @brief This function update the voltage reference of the
* control task
*
* @param[in] vref Reference voltage for the PID
*/
void
opalib_pid_update_voltage_reference
(
float32_t
vref
);
/**
* @brief This function does the PID calculation for the chosen
...
...
@@ -97,6 +89,19 @@ void opalib_pid_voltage_pwm_update(float32_t duty_cycle);
*/
void
opalib_pid_voltage_stop
(
void
);
/**
* @brief This function stops the converter by putting both timing
* units outputs
*/
void
opalib_pid_voltage_start
(
void
);
/**
* @brief This function reset the pid state
*/
void
opalib_pid_reset_state
(
void
);
#ifdef __cplusplus
}
#endif
...
...
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