Ignore:
Timestamp:
Jul 23, 2008, 2:13:20 PM (15 years ago)
Author:
Rafael de Pelegrini Soares
Message:

Sample Flowsheet working with the new interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/eml/controllers/PIDIncr.mso

    r558 r560  
    9696        EQUATIONS
    9797
    98         if (tau equal 0) then
     98        if (tau < 1e-6) then
    9999                "Input first order filter"
    100100                (tau + 1e-3*'s')*diff(Internal.inputFilt)= Ports.input - Internal.inputFilt;
     
    104104        end
    105105
    106         if (tauSet equal 0) then
     106        if (tauSet < 1e-6) then
    107107                "setPoint first order filter"
    108108                (tauSet + 1e-3*'s')*diff(Internal.setPointFilt)= Ports.setPoint - Internal.setPointFilt;
     
    151151        switch Clip
    152152        case "Clipped":
    153                 if abs(Internal.outps)>1 then
    154                         "Calculate clipped output when it´s saturated"
    155                         Ports.output=(sign(Internal.outps)*1+1)/2;
    156                 else
    157                         "Calculate clipped output when it´s not saturated"
    158                         Ports.output=Internal.outp;
    159                 end
     153                #if abs(Internal.outps)>1 then
     154                #       "Calculate clipped output when it's saturated"
     155                #       Ports.output=(sign(Internal.outps)*1+1)/2;
     156                #else
     157                #       "Calculate clipped output when it's not saturated"
     158                #       Ports.output=Internal.outps;
     159                #end
     160                Ports.output = max([0, Internal.outp]);
    160161        case "Unclipped":
    161162                "Calculate unclipped output"
Note: See TracChangeset for help on using the changeset viewer.