• Re: Issues with PI controllers/implementing SRT control

    There are many interesting aspects in your post - will try to address them all.

    [u]On SRT regulation by PI controller[/u]
    How exactly do you realize this? Can you share the WEST layout, or briefly explain how?
    In case you are controlling the sludge wastage, please remember that the standard PI model defines the "error" as the difference between the set-point and the actual measured value, i.e.
    [code]e = (y_S - y_M)[/code]
    and the "calculated action" has the [b]same sign of the error[/b]:
    [code]u = u0 + K_P * (e + (1 / T_I) * integ(e))[/code]
    This means that if the calculated SRT (y_M) is smaller than the set-point, the action (sludge wastage) will be progressively increasing - which is clearly the opposite of the desired behaviour.
    So: you need to set a [b]negative K_P[/b]; or, create a variant of the standard PI model in MSL rather.

    [u]Q1: PI's initial state[/u]
    [quote].. the controller doesn't use the steady state values, or the specified start value u0 as the initial output signal .. [/quote]
    [li]What do you mean by "steady-state values"? The controller receives its (dynamic) input from the calculator[/li]
    [li]"[b]u0[/b]" is not the initial output signal (at t=0) but the [b]no-error signal[/b], i.e. the signal when e = 0, or y_S = y_M[/li]
    [quote]Is there a way to "force" the PI regulator to start at a specific value?[/quote]
    [li]No, unless you modify the MSL and set a certain output for a given time[/li]

    [u]Q2: two parallel lines with same initial state[/u]
    The only possibility why one line starts from empty (I guess you mean: no or very little biomass) is that it has not been properly initialized through a steady-state simulation. Perhaps, you have added the second line at a later stage, once the first one had already been initialized?
    Anyway, you can get the second line to start from the exact same initial conditions as the first one, by storing the initial states of the first one ([b]Store Parameter Lib [/b] from the Model Explorer pane: you can restrict this to only the initial values of the derived states for the 1st tank) and loading them in the second one (Load Param Lib)

    [u]Q3: different behaviour on different machines[/u]
    This is really weird. I cannot believe (that is: "it should not happen") that with the same exact settings, the same exact model give two completely different outputs.
    If the problems persists, please send the entire project folder (in your Public documents) to mikebydhi@dhigroup.com

    [u]Q4: controller does not move from lower or upper bounds[/u]
    This can only be due to the settings of the model: for PI, the value of KP; for PID (this is even trickier), KP and TD.
  • Re: Custom ASM2 fractionation model

    There's absolutely no restriction as to which measurements can be used to characterize your influent.
    What WEST offers as default for ASM2 is [Q, COD, TKN, TSS, TP] (TP is to be added manually to the list in the General page of the influent tool) and a fractionation layout based on these measurements.
    If you have a different set, you need to do the following:
    [li]input the list in the General page[/li]
    [li]in the Fractionation page, you can upload the default ASM2 fractionation layout and adapt it; or start from scratch to build the fractionation layout/model for your set[/li]
    (see images)
  • Re: Re-run simulation with different input files

    The quickest to [b]interactively switch[/b] an input file to one of a number of already prepared files is probably through the Load button in the Generate & Review tab of Influent / Input blocks.

    If [b]automated execution[/b] of simulations on the basis of different input files is intended, then WEST is not an option. Only possibilities are the Experimenter (ExpScen on the basis of property ID pointing to input file name) or texec (using the –i option in combination with a input file name property ID). Some discussions on this have taken place on the Tornado/HPC forum.
  • Re: Creating a new input fractionation model

    I am afraid so, yes.
  • Re: Creating a new input fractionation model

    [quote]Any particular reason for this change?[/quote]
    It's more rigorous from a code viewpoint.
    In W2012, using a parameter block on the layout or defining a new parameter in the expression for the weight of a transformation, would both result is a parameter OBJ in the MSL code of the (de)Fractionation model.
    In W2014, a parameter can only be defined in one way, i.e. at the level of the expression for the weight of a transformation.

    [quote]How does it work for using WEST 2012 fractionation models in WEST 2014?[/quote]
    Until you don't regenerate (code and influent files) it should work just fine - as what matters is the MSL code and there, how a parameter OBJ was created, is of no relevance.
    If you need to regenerate, it may be necessary to first update the W2012 layouts to the new "concept".
  • Re: Creating a new input fractionation model

    Basically, in [b]W2012[/b], one would:
    [li]drop a "parameter" block on the canvas (your "X_I_In") and connect it to the relevant state component ("X_I")[/li]
    [li]assign a weight "1" to the conversion[/li]
    In [b]W2014[/b], one is to:
    [li]drop a "1" block on the canvas and connect it to a (set of) state component(s) (including, in your case, "X_I")[/li]
    [li]define a parameter "X_I_In"[/li]
    [li]assign a weight "parameters.X_I_In" to the conversion[/li]
  • Re: Controlling ethanol dosage to an SBR

    Ok, now it gets too difficult to answer without actually taking a look at your project.
    Can you please send the project (the whole folder) and model library (BlockLib.xml + Models subfolder) to mikebydhi@dhigroup.com ?
  • Re: ASM2 Fractionation model

    [quote]When I added TP to my defractionation model in the general tab and chose Custom, WEST placed the new TP output component by itself, ie. without connections to anything.[/quote]
    I assume you're using ASM2 right? Do you add the "TP" component to the list (in the General tab) once you've gone through the tool already, or the very first time?
    The "ideal" situation would be as follows:
    [li]start up the tool[/li]
    [li]add "TP" to the list[/li]
    [li]go to the (De)Fractionation page: you will get all the "measurements" (blue blocks) and model components (green blocks) laid out on the canvas - with no connection[/li]
    [li]load the preconfigured ASM2 (De)Fractionation Layout: since "TP" is part of the default layout, it will be connected to the right components[/li]
    Now, if you have deviated from this "ideal" path, you may end up in a situation where indeed TP is not connected to any block: e.g. if had not added TP to the list and yet loaded the default fractionation model, the TP (present in the default model) would have been removed; if you now go back to General and enter TP, by coming back to Fractionation a new TP blue block would be placed on the canvas, and it's up to you to establish the appropriate connections (or reload the default model).

    [quote]I have linked it to the variable Org_P with the fraction 1 and to the input component S_PO with the fraction 1[/quote]
    You're now talking about the defractionation model, I guess.
    The standard ASM2 has X_MEP (0.205) and X_PP (1) too to contribute to TP: load the default model and you should be able to see this.
  • Re: Creating a new model

    The procedure as outlined here applies to version 2014 and looks just fine.

    [quote]System error: Parse error at C:\Users\Public\Documents\DHI\WEST\data\blocks\WESTforOPTIMIZATION\Models\wwtp.VolumeASM1Temp_2NConversionModel.kinetics.msl:17[/quote]
    A [b]parse error[/b] is often a syntax error (e.g. ";", ":", "{", ...) and this one is located at line 17 in the ..kinetics.msl file

    What exactly have you added/deleted/edited to come to "ASM1_Temp_2N" ?

    [i]By the way: I would drop the "Temp" in the category name, to improve the overall readability[/i]
  • Re: ASM2 Fractionation model

    regarding your 1st "change": if you add the "TP" measurement to the list of custom input components in the General tab page and then load the default ASM2 fractionation model, in the Fractionation page, the TP block is already linked to TP directly - through the parameter "f_S_PO" (default value 0.6).
    The rest of TP is organic P - which is not explicitly represented in this fractionation model. You could however create a (state) variable for the fractionation model "OrgP" linked to TP and compare it to the organic P calculated using "i_P" fractions for the various components: see the defractionation model.

    2nd variation: it's perfectly ok, if you have an estimate of the soluble and particulate fractions of COD. Correct: the measured TSS is to be directly linked to the X_TSS component (weight = 1). This has no impact on whether a component takes part or not in the reactions.
    [i]What you establish at the level of the fractionation model is [b]how your measurements are mapped into the state variables[/b][/i]: once the component (main) vector is derived from your measurements, this is what goes through the plant model (S_A, S_F, .. X_AUT, .. X_TSS) according to ASM2 model description.