Brick
Toggle main menu visibility
Loading...
Searching...
No Matches
feedforward.h
Go to the documentation of this file.
1
/**
2
* @file feedforward.h
3
* @brief A pure virual class to function as an interface for all feedforward control systems
4
*
5
* This is designed as an interface for any control systems to use so long as they have:
6
* An output of any type
7
* A reference state of any type
8
*/
9
10
#pragma once
11
12
/**
13
* @brief pure virtual class for generic feedforward control systems.
14
*
15
* @param T the data type for states
16
* @param U the data type for output
17
*/
18
template
<
typename
T,
typename
U>
19
class
FeedForward
{
20
public
:
21
/// Resets the internal state of the control system
22
virtual
void
reset
() = 0;
23
/**
24
* @brief Updates the control loop output
25
*
26
* @param reference the current reference state for the system
27
* @return the controller output
28
*/
29
virtual
U
calculate
(
const
T& reference) = 0;
30
31
/// Gets the last saved output value
32
U
get_output
() {
return
output_; }
33
34
/// Gets the currently stored reference state
35
T
get_reference
() {
return
reference_; }
36
37
U output_min_;
38
U output_max_;
39
40
protected
:
41
T reference_;
42
43
U output_;
44
};
FeedForward
pure virtual class for generic feedforward control systems.
Definition
feedforward.h:19
FeedForward::reset
virtual void reset()=0
Resets the internal state of the control system.
FeedForward::calculate
virtual U calculate(const T &reference)=0
Updates the control loop output.
FeedForward::get_reference
T get_reference()
Gets the currently stored reference state.
Definition
feedforward.h:35
FeedForward::get_output
U get_output()
Gets the last saved output value.
Definition
feedforward.h:32
core
math
controls
feedforward.h
Generated by
1.18.0