Controlpp
Loading...
Searching...
No Matches
controlpp::timevar::LeadLagControl< T > Class Template Reference

A Lead-Lag control element with varying sample-times. More...

#include <controlpp/TimeVariantControl.hpp>

Public Member Functions

constexpr LeadLagControl (const T &omega1, const T &omega2)
 
constexpr T input (const T &u, const T &Ts)
 
constexpr T operator() (const T &u, const T &Ts)
 
constexpr void reset ()
 

Friends

constexpr ValueSampletimePair< T > operator>> (const ValueSampletimePair< T > &p, LeadLagControl &c)
 

Detailed Description

template<class T>
class controlpp::timevar::LeadLagControl< T >

A Lead-Lag control element with varying sample-times.

Has a continuous transfer function of:

\[ LeadLag(s) = \frac{1 + \frac{s}{\omega_1}}{1 + \frac{s}{\omega_2}} \]

transformed with the tustin transformation to the following time series:

\[ y_k = \frac{ \left( T_s \omega_2 + \frac{2 \omega_2}{\omega_1} \right) u_k + \left( T_s \omega_2 - \frac{2 \omega_2}{\omega_1} \right) u_{k-1} - \left( T_s \omega_2 - 2 \right)}{ T_s \omega_2 + 2 } \]

with:

  • \(T_s\) The sample-time in seconds
  • \(\omega_1\) The characteristic frequency of the phase lead
  • \(omega_2\) The characteristic frequency of the phase lag
  • \(u_{k}\) and \(u_{k-1}\) are current and previous control inputs
  • \(y_{k}\) and \(y_{k-1}\) are current and previous control outputs

Constructor & Destructor Documentation

◆ LeadLagControl()

template<class T >
constexpr controlpp::timevar::LeadLagControl< T >::LeadLagControl ( const T &  omega1,
const T &  omega2 
)
inlineconstexpr

Member Function Documentation

◆ input()

template<class T >
constexpr T controlpp::timevar::LeadLagControl< T >::input ( const T &  u,
const T &  Ts 
)
inlineconstexpr

◆ operator()()

template<class T >
constexpr T controlpp::timevar::LeadLagControl< T >::operator() ( const T &  u,
const T &  Ts 
)
inlineconstexpr

◆ reset()

template<class T >
constexpr void controlpp::timevar::LeadLagControl< T >::reset ( )
inlineconstexpr

Friends And Related Symbol Documentation

◆ operator>>

template<class T >
constexpr ValueSampletimePair< T > operator>> ( const ValueSampletimePair< T > &  p,
LeadLagControl< T > &  c 
)
friend

The documentation for this class was generated from the following file: