The USER1 to USER9 methods

The method USER1 permits you to write directly in FORTRAN a new regulation module. We can program it in the same way as for the CPID routine (see above). This method requires a compilation of this module by the Microsoft Digital 6.1 or above compiler (32 bit compiler) and a new link edition by the linker associated. On the other hand, the program execution is very fast. To write this module you can take the inspiration from the PID module presented above. We can imagine that we finalise a method thanks to the MATLAB method and when it is finalised and tested, we integrate it in the SIC software by the USER method to increase the execution speed.

We can program up to 9 regulation modules by using USER1 to USER9 methods. For each one, there are 3 routines that may need to be informed in the SIRVID.FOR file:

  1. SUBROUTINE SUSER1
  2. END
  3.  
  4. SUBROUTINE LUSER1(CHAINE,PARA)
  5. CHARACTER CHAINE*(*)
  6. DIMENSION PARA(*)
  7. END
  8.  
  9. SUBROUTINE CUSER1(U,Y,YT,Z,PARA)
  10. DIMENSION U(*), Y(*), YT(*), Z(*), PARA(*)
  11. END

Download

The SUSER1 routine is a supervision routine called at each time step. It gives you the possibility to change parameters of a regulation module, of method type, etc.

The LUSER1 (CHAINE,PARA) routine is only called at the beginning of the program, at the initial time. It is called every time that a "PS=" line is met for this method USER1 in the .REG file. It permits you to read the specific parameters of the USER1 method, in the chain of character (CHAIN) placed after a "PS=" code . If several "PS=" lines must be read then it is necessary to manage a line meter in this LUSER1 routine, permitting you to read different variables in different lines. The PARA vector is sized at 50 (it was 10, 20 or 22 in older versions of SIC), this means that 50 maximum parameters can be read and can be stored by this reading routine. If you want to read and to store more than 50 parameters you must choose and use another common. Common names already used (and therefore to be avoided) are specified at the beginning of the SIRVID.FOR file.

The routine CUSER1 is a regulation routine called for each time step, after the SUSER1 supervisory routine. It permits you to calculate control action variables U from the controlled variables Y, corresponding orders YT, measured variables Z and from parameters placed in the table PARA. The number, type and site of these variables are described in the regulation file .REG.