cpp_robotics::TransferFunction
伝達関数モデル
#include <transfer_function.hpp>
Inherited by cpp_robotics::BandPassFilter, cpp_robotics::ButterworthFilter, cpp_robotics::Differentiator, cpp_robotics::HighPassFilter, cpp_robotics::Integrator, cpp_robotics::LowPassFilter, cpp_robotics::NotchFilter
Public Classes
Name | |
---|---|
struct | tf_t |
Protected Classes
Name | |
---|---|
class | CircularBuffer |
Public Functions
Name | |
---|---|
TransferFunction | make_first_order_system(const double T, const double Ts) |
TransferFunction | make_second_order_system(const double omega, const double zeta, const double Ts) |
TransferFunction() =default | |
TransferFunction(std::vector< double > num, std::vector< double > den, const double Ts) Construct a new Transfer Function object. |
|
TransferFunction(const tf_t & tf_config) | |
void | set_continuous(std::vector< double > num, std::vector< double > den, const double dt) |
void | set_discrite(std::vector< double > num_disc, std::vector< double > den_disc, const double dt) |
double | Ts() const サンプリング周期 |
virtual void | reset(double state =0) |
double | responce(double u) |
size_t | num_deg(size_t num_idx =0) const |
size_t | den_deg(size_t num_idx =0) const |
std::vector< double > | num_array() const |
std::vector< double > | den_array() const |
operator tf_t() const | |
tf_t | inv() const |
tf_t | operator+(double val) const |
tf_t | operator-(double val) const |
tf_t | operator*(double val) const |
tf_t | operator/(double val) const |
Protected Attributes
Name | |
---|---|
std::vector< double > | num_array_ |
std::vector< double > | den_array_ |
std::vector< double > | num_ |
std::vector< double > | den_ |
CircularBuffer< double > | u_ |
CircularBuffer< double > | y_ |
double | dt_ |
Friends
Public Functions Documentation
function make_first_order_system
static inline TransferFunction make_first_order_system(
const double T,
const double Ts
)
function make_second_order_system
static inline TransferFunction make_second_order_system(
const double omega,
const double zeta,
const double Ts
)
function TransferFunction
TransferFunction() =default
function TransferFunction
inline TransferFunction(
std::vector< double > num,
std::vector< double > den,
const double Ts
)
Construct a new Transfer Function object.
Parameters:
- num 分子の係数 配列の先頭が最高次の係数
- den 分母の係数 配列の先頭が最高次の係数
- Ts サンプリング周期
function TransferFunction
inline TransferFunction(
const tf_t & tf_config
)
function set_continuous
inline void set_continuous(
std::vector< double > num,
std::vector< double > den,
const double dt
)
function set_discrite
inline void set_discrite(
std::vector< double > num_disc,
std::vector< double > den_disc,
const double dt
)
function Ts
inline double Ts() const
サンプリング周期
Return: double
function reset
inline virtual void reset(
double state =0
)
Reimplemented by: cpp_robotics::Differentiator::reset
function responce
inline double responce(
double u
)
function num_deg
inline size_t num_deg(
size_t num_idx =0
) const
function den_deg
inline size_t den_deg(
size_t num_idx =0
) const
function num_array
inline std::vector< double > num_array() const
function den_array
inline std::vector< double > den_array() const
function operator tf_t
inline operator tf_t() const
function inv
inline tf_t inv() const
function operator+
inline tf_t operator+(
double val
) const
function operator-
inline tf_t operator-(
double val
) const
function operator*
inline tf_t operator*(
double val
) const
function operator/
inline tf_t operator/(
double val
) const
Protected Attributes Documentation
variable num_array_
std::vector< double > num_array_;
variable den_array_
std::vector< double > den_array_;
variable num_
std::vector< double > num_;
variable den_
std::vector< double > den_;
variable u_
CircularBuffer< double > u_;
variable y_
CircularBuffer< double > y_;
variable dt_
double dt_;
Friends
friend operator+
friend tf_t operator+(
double val,
const TransferFunction & tf
);
friend operator-
friend tf_t operator-(
double val,
const TransferFunction & tf
);
friend operator*
friend tf_t operator*(
double val,
const TransferFunction & tf
);
friend operator/
friend tf_t operator/(
double val,
const TransferFunction & tf
);
friend operator+
friend tf_t operator+(
const tf_t & a,
const TransferFunction & b
);
friend operator-
friend tf_t operator-(
const tf_t & a,
const TransferFunction & b
);
friend operator*
friend tf_t operator*(
const tf_t & a,
const TransferFunction & b
);
friend operator/
friend tf_t operator/(
const tf_t & a,
const TransferFunction & b
);
friend operator+
friend tf_t operator+(
const TransferFunction & a,
const tf_t & b
);
friend operator-
friend tf_t operator-(
const TransferFunction & a,
const tf_t & b
);
friend operator*
friend tf_t operator*(
const TransferFunction & a,
const tf_t & b
);
friend operator/
friend tf_t operator/(
const TransferFunction & a,
const tf_t & b
);
friend operator+
friend tf_t operator+(
const TransferFunction & a,
const TransferFunction & b
);
friend operator-
friend tf_t operator-(
const TransferFunction & a,
const TransferFunction & b
);
friend operator*
friend tf_t operator*(
const TransferFunction & a,
const TransferFunction & b
);
friend operator/
friend tf_t operator/(
const TransferFunction & a,
const TransferFunction & b
);
friend operator<<
friend std::ostream & operator<<(
std::ostream & stream,
const TransferFunction & tf
);
Updated on 2024-05-28 at 06:55:40 +0000