actuator.hpp
Go to the documentation of this file.
00001 /*
00002  *    This file is part of ACADO Toolkit.
00003  *
00004  *    ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
00005  *    Copyright (C) 2008-2014 by Boris Houska, Hans Joachim Ferreau,
00006  *    Milan Vukov, Rien Quirynen, KU Leuven.
00007  *    Developed within the Optimization in Engineering Center (OPTEC)
00008  *    under supervision of Moritz Diehl. All rights reserved.
00009  *
00010  *    ACADO Toolkit is free software; you can redistribute it and/or
00011  *    modify it under the terms of the GNU Lesser General Public
00012  *    License as published by the Free Software Foundation; either
00013  *    version 3 of the License, or (at your option) any later version.
00014  *
00015  *    ACADO Toolkit is distributed in the hope that it will be useful,
00016  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  *    Lesser General Public License for more details.
00019  *
00020  *    You should have received a copy of the GNU Lesser General Public
00021  *    License along with ACADO Toolkit; if not, write to the Free Software
00022  *    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00023  *
00024  */
00025 
00026 
00033 #ifndef ACADO_TOOLKIT_ACTUATOR_HPP
00034 #define ACADO_TOOLKIT_ACTUATOR_HPP
00035 
00036 
00037 #include <acado/utils/acado_utils.hpp>
00038 #include <acado/transfer_device/transfer_device.hpp>
00039 
00040 
00041 BEGIN_NAMESPACE_ACADO
00042 
00043 
00054 class Actuator : public TransferDevice
00055 {
00056         //
00057         // PUBLIC MEMBER FUNCTIONS:
00058         //
00059         public:
00060 
00063                 Actuator( );
00064 
00071                 Actuator(       uint _nU,
00072                                         uint _nP = 0,
00073                                         double _samplingTime = DEFAULT_SAMPLING_TIME
00074                                         );
00075 
00080                 Actuator(       const Actuator& rhs
00081                                         );
00082 
00085                 virtual ~Actuator( );
00086 
00091                 Actuator& operator=(    const Actuator& rhs
00092                                                                 );
00093 
00094 
00104                 returnValue setControlNoise(    const Noise& _noise,
00105                                                                                 double _noiseSamplingTime
00106                                                                                 );
00107 
00118                 returnValue setControlNoise(    uint idx,
00119                                                                                 const Noise& _noise,
00120                                                                                 double _noiseSamplingTime
00121                                                                                 );
00122 
00123 
00133                 returnValue setParameterNoise(  const Noise& _noise,
00134                                                                                 double _noiseSamplingTime
00135                                                                                 );
00136 
00147                 returnValue setParameterNoise(  uint idx,
00148                                                                                 const Noise& _noise,
00149                                                                                 double _noiseSamplingTime
00150                                                                                 );
00151 
00152 
00161                 returnValue setControlDeadTimes(        const DVector& _deadTimes
00162                                                                                         );
00163 
00172                 returnValue setControlDeadTimes(        double _deadTime
00173                                                                                         );
00174 
00184                 returnValue setControlDeadTime(         uint idx,
00185                                                                                         double _deadTime
00186                                                                                         );
00187 
00188 
00197                 returnValue setParameterDeadTimes(      const DVector& _deadTimes
00198                                                                                         );
00199 
00208                 returnValue setParameterDeadTimes(      double _deadTime
00209                                                                                         );
00210 
00220                 returnValue setParameterDeadTime(       uint idx,
00221                                                                                         double _deadTime
00222                                                                                         );
00223 
00224 
00234                 virtual returnValue init(       double _startTime = 0.0,
00235                                                                         const DVector& _startValueU = emptyConstVector,
00236                                                                         const DVector& _startValueP = emptyConstVector
00237                                                                         );
00238 
00239 
00251                 virtual returnValue step(       VariablesGrid& _u,
00252                                                                         VariablesGrid& _p = emptyVariablesGrid
00253                                                                         );
00254 
00255 
00260                 inline uint getNU( ) const;
00261 
00266                 inline uint getNP( ) const;
00267 
00268 
00275                 inline Noise* getControlNoise(  uint idx
00276                                                                                 ) const;
00277 
00284                 inline Noise* getParameterNoise(        uint idx
00285                                                                                         ) const;
00286 
00287 
00294                 inline double getControlDeadTime(       uint idx
00295                                                                                         ) const;
00296 
00301                 inline DVector getControlDeadTimes( ) const;
00302 
00303 
00310                 inline double getParameterDeadTime(     uint idx
00311                                                                                         ) const;
00312 
00317                 inline DVector getParameterDeadTimes( ) const;
00318 
00319 
00320 
00321         //
00322         // PROTECTED MEMBER FUNCTIONS:
00323         //
00324         protected:
00325 
00336                 returnValue checkInputConsistency(      const VariablesGrid& _u,
00337                                                                                         const VariablesGrid& _p
00338                                                                                         ) const;
00339 
00340 
00349                 returnValue delayActuatorInput( VariablesGrid& _u,
00350                                                                                 VariablesGrid& _p
00351                                                                                 );
00352 
00363                 returnValue getDelayedInputGrids(       const VariablesGrid& _u,
00364                                                                                         const VariablesGrid& _p,
00365                                                                                         VariablesGrid& _uDelayed,
00366                                                                                         VariablesGrid& _pDelayed
00367                                                                                         ) const;
00368 
00369 
00378                 returnValue addActuatorNoise(   VariablesGrid& _u,
00379                                                                                 VariablesGrid& _p
00380                                                                                 ) const;
00381 
00382 
00383 
00384         //
00385         // DATA MEMBERS:
00386         //
00387         protected:
00388 
00389                 uint nU;                                                
00390                 uint nP;                                                
00391 };
00392 
00393 
00394 CLOSE_NAMESPACE_ACADO
00395 
00396 
00397 #include <acado/transfer_device/actuator.ipp>
00398 
00399 
00400 #endif  // ACADO_TOOLKIT_ACTUATOR_HPP
00401 
00402 /*
00403  *      end of file
00404  */


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Sat Jun 8 2019 19:36:41