[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [TRNSYS-users] if contition
<I am trying to imply an if condition in the simulation studio, but I
don't know How..
I want to compare 2 temperatures and if the DT is above a limit I want to
have a state 0 or else a state 1..>
EQUATIONS 1
RESULT=LT((T2-T1),VALUE)
Or you can add the ABS function if you need it:
EQUATIONS 1
RESULT=LT(ABS(T2-T1),VALUE)
But be forewarned - if you use this approach to generate a control signal
you will likely run into convergence problems at some point. The Type 2
differential controller does exactly what you are looking for - and has
stability built in...
Jeff
Jeff Thornton
President - TESS, LLC
2916 Marketplace Drive - Suite 104
Madison WI 53719 USA
Phone: 608-274-2577
Fax: 608-278-1475
E-mail: thornton@tess-inc.com
Web: www.tess-inc.com