[TRNSYS-users] TR: PID controller in TRNSYS developer

Marcus jones.0bj3 at gmail.com
Wed Nov 16 11:17:25 PST 2011


I just wanted to quickly mention that from my experience with PID control
in TRNSYS, you should start with Kp  ~ 0, Ki = timestep, and Kd = 0.
Furthermore, give the simulation a very short timestep. So I typically
start with Kp = 0.00001 and timestep = 30 seconds, and then slowly increase
Kp. As I guess you realize now, this is to first eliminate any oscillatory
effect due to high gains over large discrete timesteps.

Cheers,

Marcus
-- 
Marcus Jones,  M.Sc., LEED®AP BD+C
*Freelance energy consultant*
*Vienna, Austria*




On Wed, Nov 16, 2011 at 4:17 PM,
<marcello.caciolo at aximaseitha-gdfsuez.com>wrote:

> Sorry, in the point 2) you should read “Input 11 (Fraction of ySet for
> proportional effect) should be set to *one*”****
>
> ** **
>
> *De :* trnsys-users-bounces at cae.wisc.edu [mailto:
> trnsys-users-bounces at cae.wisc.edu] *De la part de*
> marcello.caciolo at aximaseitha-gdfsuez.com
> *Envoyé :* mercredi 16 novembre 2011 16:14
> *À :* yang.wang at unibw.de; trnsys-users at cae.wisc.edu
> *Objet :* [SUSPECTED IDENTITY THEFT] Re: [TRNSYS-users] PID controller in
> TRNSYS developer****
>
> ** **
>
> Dear Wang,****
>
> ** **
>
> As I used the PID control many times, I am sure that there is no problem
> with the code…I suggest you to check the following two points:****
>
> ** **
>
> **1)      **Concentration unit: it happened to me to make trivial errors
> because of the expression of concentration: check if the output of your
> model is not expressed in percent or per mille instead of ppm;****
>
> **2)      **Input 11 (Fraction of ySet for proportional effect) should be
> set to zero and parameter 1 (mode) to zero.****
>
> ** **
>
> In addition, you should plot the output 2 and 4 in order to understand
> where the problem is. Output 2 should be equal to set-point concentration
> minus actual concentration, output 4 to output 2 multiplied by kp.****
>
> ** **
>
> Good luck!****
>
> ** **
>
> Best regards,****
>
> ** **
>
> Marcello****
>
> ** **
>
> *De :* wanghongyang1767 at gmail.com [mailto:wanghongyang1767 at gmail.com] *De
> la part de* wangyang
> *Envoyé :* mercredi 16 novembre 2011 13:00
> *À :* Caciolo Marcello (Axima Seitha);; hotline at transsolar.com
> *Objet :* Re: [TRNSYS-users] PID controller in TRNSYS developer****
>
> ** **
>
> Dear marcello.caciolo,****
>
>  ****
>
> Many thanks for your quick reply!****
>
>  ****
>
> I know and understand all what you explained. Since my profession for
> Bachelor and Master is Automation control. That is also the reason why I
> suspect the function of PID controller in TRNSYS. As you said, I tried many
> time the gain Kp and integral time Ki and small time step 1 min or smaller
> in order to avoid oscillations, a large difference between the set point
> 1000 ppm and actual CO2 concentration etc.****
>
>  ****
>
> I mentioned already as my first email about PID controller: I set the set
> point CO2 concentration 1000 ppm as PID controller's set point; its control
> signal links to Opening Factor (OF) of windows; indoor CO2 concentration
> links to PID's controlled variable. However, when indoor CO2 concentration
> is less than set point 1000 ppm, PID begins to activate OF i.e. windows are
> open. Based on PID principle, control signal should be set to zero. BUT
> it is not like this. As we know, if CO2 concentration is not getting to
> set point 1000 ppm, at this time windows are open will result in the ERROR
> (between the set point and actual indoor CO2 concentration) increasing. So
> I'm puzzled! So I suspect the function of PID controller in TRNSYS.****
>
>  ****
>
>  ****
>
> Now, I only would like a solution for this problem as I said in recent
> emails and the adequate explanations for this OF_CO2 concentration_PID
> control issue in TRNSYS .****
>
>  ****
>
>  ****
>
> Many thanks in advance!****
>
>  ****
>
> br****
>
>  ****
>
> wang****
>
>  ****
>
>  ****
>
>  ****
>
> ** **
>
> 2011/11/16 <marcello.caciolo at aximaseitha-gdfsuez.com>****
>
> Dear Wang,****
>
>  ****
>
> I find that your problem description is not very clear, but I try anyway
> to guess what you want to do.****
>
>  ****
>
> In my understanding, if you want CO2 concentration to be less than 1000
> ppm, you should use a PID control with a positive gain and an output signal
> between 0 and 1, directly connected to the OF. In this way, if the CO2
> concentration is less than 1000 ppm, the error (and integral and derivative
> part of the signal, if present) of the PID control will be negative, so
> that control signal is set to zero. On the other hand, when CO2
> concentration is above 1000 ppm, the error is positive and the output
> signal will be more than 0, so opening the window. ****
>
>  ****
>
> Take care to the choice of the gain of the PID: a too high value could
> generate oscillations, while a value too low will lead to a large
> difference between actual and setpoint CO2 concentration. Also note that,
> without an integral part, the PID control is purely proportional and will
> always lead to a CO2 concentration higher than 1000 ppm. However, the
> integral time should be high enough to prevent oscillations. The time
> period should be also short enough in order to avoid instabilities in
> control.****
>
>  ****
>
> Guessing a good value of the gain and the integral time of a PID needs to
> wall understand the main principles of a proportional and integral
> controller. I suggest you to have a look to some textbooks about HVAC
> control in order to understand  these principles.****
>
>  ****
>
> I hope that these explanation will help you.****
>
>  ****
>
> Best regards,****
>
> *Marcello CACIOLO*
> Responsable Outils et Méthodes d'Analyse Energétique
> ___________________________________________________
>
> *Erreur ! Nom du fichier non spécifié.*
> *
> Cellule Efficacité Energétique*****
>
> Direction Commerciale*
> *46 Boulevard de la Prairie au Duc BP 40119
> 44000 Nantes Cédex 2
> Tel. 02 40 41 06 57****
>
>
> mail: marcello.caciolo at aximaseitha-gdfsuez.com****
>
> *
> *www.aximaseitha-gdfsuez.com****
>
>  ****
>
> P *Pensez à l'environnement avant d'imprimer ce message*****
>
>  ****
>
>  ****
>
> *De :* trnsys-users-bounces at cae.wisc.edu [mailto:
> trnsys-users-bounces at cae.wisc.edu] *De la part de* wangyang
> *Envoyé :* mercredi 16 novembre 2011 10:53
> *À :* David BRADLEY; trnsys-users at cae.wisc.edu; hotline at transsolar.com
> *Objet :* Re: [TRNSYS-users] PID controller in TRNSYS developer****
>
>  ****
>
> Dear David,****
>
>  ****
>
> As I said yesterday, I linked PID's output Control Signal to a minus 1
> then to OF. The results are still very *WEIRD. *OF becomes minus value
> which is not reasonable very much i.e. the window is open towards abnormal
> direction; CO2 concentration is not decreasing as we hoped, however, it is
> becoming much more bigger e.g. 4000 ppm.****
>
>  ****
>
> Now, I only would like a solution for this problem as I said in last email
> and the adequate explanations for this OF_CO2 concentration_PID control
> issue.****
>
>  ****
>
>  ****
>
> Many thanks in advance!****
>
>  ****
>
> br****
>
>  ****
>
> wang****
>
>  ****
>
>  ****
>
> 2011/11/15 王洋 <wanghongyang1767 at gmail.com>****
>
> Dear David,****
>
>  ****
>
> Many thanks for your reply!****
>
>  ****
>
> I already saw both of them as you mentioned, however, they are not helpful
> for my simulation results i.e. they don't explain the things I wanted.****
>
>  ****
>
> Your heating/cooling example is very vivid. Do you mean I need add an
> equation after the PID i.e. link PID's output Control Signal to a minus 1
> then to OF? ****
>
>  ****
>
> Now, I only would like a solution for this problem as I said in last email
> and the adequate explanations for this OF_CO2 concentration_PID control
> issue.****
>
>  ****
>
>  ****
>
> Many thanks in advance!****
>
>  ****
>
> br****
>
>  ****
>
> wang****
>
>  ****
>
>
>  ****
>
> 2011/11/14 David BRADLEY <d.bradley at tess-inc.com>****
>
> Wang,
>   You should already have the source code for the PID controller in
> ..\TrnsysXX\SourceCode\Types\. I would also recommend reading the Type23
> section of the 04-MathematicalDescription manual.
>
>   PID controllers can operate in one of two ways: they can generate a
> greater signal value if the sampled input value is below the set point or
> they can generate a greater signal value if the sampled input is above the
> current set point. Imagine a heating application with a PID controller. As
> the zone temperature falls, you want the PID to give you a bigger and
> bigger signal. Now imagine a cooling application. As the zone temperature
> rises, you want the PID to give you a bigger and bigger signal. You may
> have to add an equation after the PID to invert its control signal if it is
> acting the opposite of the way that you want.
>
> David ****
>
>
>
> On 11/14/2011 04:28, wangyang wrote: ****
>
> Dear all,****
>
>  ****
>
>     I have a question about PID controller in TRNSYS for its developer.***
> *
>
>  ****
>
>     Which expert knows PID controller in TRNSYS developer? Or Which expert
> could pass me the source code of PID controller or its internal algorithm
> etc.? I guess PID controller in TRNSYS is based on empirical equation or
> iterative algorithm. Since there is *very weird* simulation results i.e.
> I set the set point CO2 concentration 1000 ppm as PID controller's set
> point; its control signal links to Opening Factor (OF) of windows; indoor
> CO2 concentration links to PID's controlled variable. However, when indoor
> CO2 concentration is less than set point 1000 ppm, PID begins to activate
> OF i.e. windows are open. But based on PID principle, as we know, if CO2
> concentration is not getting to set point 1000 ppm, at this time windows
> are open will result in *the ERROR* (between the set point and actual
> indoor CO2 concentration)* increasing. *So I'm puzzled! Please PID
> controller in TRNSYS developer or other experts explain this weird
> phenomenon!****
>
>    Many thanks in advance!****
>
>  ****
>
>    br****
>
>  ****
>
>    wang****
>
>  ****
>
> 2011/11/12 <trnsys-users-request at cae.wisc.edu>****
>
> Send TRNSYS-users mailing list submissions to
>        trnsys-users at cae.wisc.edu
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        https://mailman.cae.wisc.edu/listinfo/trnsys-users
> or, via email, send a message with subject or body 'help' to
>        trnsys-users-request at cae.wisc.edu
>
> You can reach the person managing the list at
>        trnsys-users-owner at cae.wisc.edu
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of TRNSYS-users digest..."
>
> Today's Topics:
>
>   1. Re: (no subject) (David BRADLEY)
>   2. Re: TRNSYS3D Shading on Walls? (David BRADLEY)
>   3. Re: how to identify a wall that is adjacent two walls
>      (David BRADLEY)
>   4. Error in reading type 51 external performance File
>      (Walif M'kacher)
>
>
> ---------- 已转发邮件 ----------
> From: David BRADLEY <d.bradley at tess-inc.com>
> To: Erik Boschek <erikboschek at yahoo.com>
> Date: Fri, 11 Nov 2011 12:01:47 -0600
> Subject: Re: [TRNSYS-users] (no subject)****
>
> Erik,
>  You are right on with all three of your points. For reference, we
> discontinued use of Type109 in Trnsys17 in favor of option 2 (Type15),
> which is correct from an energy perspective even though it isn't a smooth
> curve. In gernal think that a control strategy that relies only on the
> instantaneous DNI as its input might run into trouble not only in
> simulation but also in the real world; clouds pass in front of the sun
> rapidly sometimes. While I won't pretend that the "spiky" profile that
> Type15 generates is totally realistic, I think it is a fairly accurate
> representation of DNI. Bear in mind that Type15 is trying to reconstruct a
> minute by minute radiation profile based only on 1 number and to do so
> correctly for all possible climate types. You might consider a control
> strategy that uses the output of Type15 but put through a running-average
> component so that your control decisions are based on a somewhat more
> stable (smoother) profile.
> Best,
>  David
>
>
> On 11/11/2011 00:32, Erik Boschek wrote: ****
>
>  ****
>
> Dear TRNSYS users,****
>
>  ****
>
> I have a simple question regarding weather reading and interpolating
> direct normal radiation (DNI) values for time steps less than an hour.****
>
>  ****
>
> As long as I have been using TRNSYS (using TRNSYS 16.1) I have understood
> this can be done in a few ways as follows, including the consequence for an
> example TM2 file (see attached screen shot for clarification):****
>
>  ****
>
> 1.) Do not interpolate, using Type 15 with output DNR (not interpolated):
> you end up with a "steppy" profile****
>
> 2.) Using Type 15, but with 2-axis tracking and the output "Beam radiation
> for surface": you get a discontinuous "spikey" profile, but the integration
> of energy across the hour is respected****
>
> 3.) Same as 2, but using Type109-TMY2: You get a smooth profile, but often
> there appear inexplicable spikes at the beginning or end of the day. The
> one in the plot obviously is an extreme case.****
>
>  ****
>
> For reference: I just used the Daggett profile "US-CA-Daggett-23161.tm2"
> which came with TRNSYS, but the behavior is not specific to this file.****
>
>  ****
>
> Generally, I have been using 2, but it can cause problems if there is, for
> example, some triggering function based on DNI and the DNI hovers around
> the threshold. Is there another option for getting a smoother profile or is
> it best just to not interpolate? Any opinions? Feel free to point me to an
> earlier post on this topic in case I missed it.****
>
>  ****
>
> Thanks,****
>
>  ****
>
> Erik Boschek****
>
>  ****
>
>  ****
>
>  ****
>
>  ****
>
>  ****
>
>  ****
>
>  ****
>
> _______________________________________________****
>
> TRNSYS-users mailing list****
>
> TRNSYS-users at cae.wisc.edu****
>
> https://mailman.cae.wisc.edu/listinfo/trnsys-users****
>
> ** **
>
> -- ****
>
> *******************************
>
> David BRADLEY****
>
> Principal****
>
> Thermal Energy Systems Specialists, LLC****
>
> 22 North Carroll Street - suite 370****
>
> Madison, WI  53703 USA****
>
>  ****
>
> P:+1.608.274.2577****
>
> F:+1.608.278.1475****
>
> d.bradley at tess-inc.com****
>
>  ****
>
> http://www.tess-inc.com****
>
> http://www.trnsys.com****
>
>
>
> ---------- 已转发邮件 ----------
> From: David BRADLEY <d.bradley at tess-inc.com>
> To: Marion Hiller <hiller at transsolar.com>
> Date: Fri, 11 Nov 2011 12:03:16 -0600
> Subject: Re: [TRNSYS-users] TRNSYS3D Shading on Walls?
> TRNSYS-users,
>  My apologies; my reply to Graham was incorrect; as Marion says, only the
> windows are affected.
> Kind regards,
>  David
>
>
> On 11/11/2011 01:33, Marion Hiller wrote:****
>
> Graham,
>
> the shading defined in Trnsys3D effects only windows.
>
> Marion
>
> Dipl.-Ing. Marion Hiller
> TRANSSOLAR: KlimaEngineering - Technologien für energieeffizientes Bauen
> und Nutzerkomfort in Gebäude
> Munich - New York - Stuttgart + 49.711.67976.0
>
> Transsolar Energietechnik GmbH, Curiestrasse 2, 70563 Stuttgart
> Amtsgericht Stuttgart - HRB 23347, Steuernummer 99073/00911, USt-IdNr.:
> DE152272639
> Geschäftsführer: Dipl.Ing. Matthias Schuler, Dipl.Ing. Thomas Auer,
> Dipl.Phys. Stefan Holst, Prof. Dipl.-Ing. Bleicher
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Graham Linn [mailto:grahamjlinn at gmail.com]
> Gesendet: Donnerstag, 10. November 2011 21:49
> An: trnsys-users at cae.wisc.edu
> Betreff: [TRNSYS-users] TRNSYS3D Shading on Walls?
>
> Hello TRNSYS users,
>
> I have a question about shading in TRNSYS3D. Does a shading object
> affect how much insolation hits the entire building or just the
> windows on the building?
>
> Thank you!
> Graham
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at cae.wisc.edu
> https://mailman.cae.wisc.edu/listinfo/trnsys-users
>
>
>
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at cae.wisc.edu
> https://mailman.cae.wisc.edu/listinfo/trnsys-users****
>
>
> --
> ***************************
> David BRADLEY
> Principal
> Thermal Energy Systems Specialists, LLC
> 22 North Carroll Street - suite 370
> Madison, WI  53703 USA
>
> P:+1.608.274.2577
> F:+1.608.278.1475
> d.bradley at tess-inc.com
>
> http://www.tess-inc.com
> http://www.trnsys.com
>
>
>
>
> ---------- 已转发邮件 ----------
> From: David BRADLEY <d.bradley at tess-inc.com>
> To: Nidal Abdalla <nidalabdalla at yahoo.com>
> Date: Fri, 11 Nov 2011 12:29:48 -0600
> Subject: Re: [TRNSYS-users] how to identify a wall that is adjacent two
> walls****
>
> Nidal,
>   You have to be a little careful here. If you have a wall in zone 1, half
> of which is adjacent to zone 2 and half of which is adjacent to zone 3, you
> actually need to draw the wall as two walls in zone 1. Trnsys3D requires
> the user to be quite vigilant about manually setting adjacencies. You need
> to draw the ADJACENT wall in both zones and you need to open the object
> window for each of them, set the construction to ADJ_WALL, set the "outside
> boundary condition" to "Zone" and then manually select the zone to which it
> is adjacent in the "outside boundary object" field.
>
>   If you have been very careful about drawing your ADJACENT walls so that
> they have exactly the same verticies in both zones to which they belong,
> you can then select the menu item:  Plugins: Trnsys3d: Surface Matching and
> click the "match in entire model" button.
>
> Kind regards,
>  David
>
>
> On 11/11/2011 08:32, Nidal Abdalla wrote: ****
>
> I drew a house using Trnsys3d that consists of: 3 bed rooms, living room,
> guest room and bath . The house was divided into 6 zones. Wall_zone5, for
> example, is adjacent two walls for two different zones. I am wondering how
> to identify a wall (using Object Info) that is adjacent two or more walls
> of diff. zones.****
>
>  ****
>
> Best Regards****
>
>  ****
>
> Nidal Abdalla****
>
>  ****
>
>  ****
>
> _______________________________________________****
>
> TRNSYS-users mailing list****
>
> TRNSYS-users at cae.wisc.edu****
>
> https://mailman.cae.wisc.edu/listinfo/trnsys-users****
>
> ** **
>
> -- ****
>
> *******************************
>
> David BRADLEY****
>
> Principal****
>
> Thermal Energy Systems Specialists, LLC****
>
> 22 North Carroll Street - suite 370****
>
> Madison, WI  53703 USA****
>
>  ****
>
> P:+1.608.274.2577****
>
> F:+1.608.278.1475****
>
> d.bradley at tess-inc.com****
>
>  ****
>
> http://www.tess-inc.com****
>
> http://www.trnsys.com****
>
>
>
> ---------- 已转发邮件 ----------
> From: "Walif M'kacher" <walif.mkacher at gmail.com>
> To: trnsys-users at cae.wisc.edu
> Date: Sat, 12 Nov 2011 15:13:05 +0100
> Subject: [TRNSYS-users] Error in reading type 51 external performance File
> ****
>
> Dear TRNSys Users,****
>
>  ****
>
> I have a problem with external file of type 51a (cooling tower with an
> external performance File):****
>
>  ****
>
> That the simulation with this type causes error and this can't read this
> external file (.txt)****
>
>  ****
>
>  ****
>
> Would you please help me how to correct the file joined or send me a truth
> format of this .txt file****
>
>  ****
>
>  ****
>
> Many thanks in advance****
>
>  ****
>
> *Mkacher Walif*****
>
>
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at cae.wisc.edu
> https://mailman.cae.wisc.edu/listinfo/trnsys-users****
>
> ** **
>
> _______________________________________________****
>
> TRNSYS-users mailing list****
>
> TRNSYS-users at cae.wisc.edu****
>
> https://mailman.cae.wisc.edu/listinfo/trnsys-users****
>
> ** **
>
> -- ****
>
> *******************************
>
> David BRADLEY****
>
> Principal****
>
> Thermal Energy Systems Specialists, LLC****
>
> 22 North Carroll Street - suite 370****
>
> Madison, WI  53703 USA****
>
>  ****
>
> P:+1.608.274.2577****
>
> F:+1.608.278.1475****
>
> d.bradley at tess-inc.com****
>
>  ****
>
> http://www.tess-inc.com****
>
> http://www.trnsys.com****
>
>  ****
>
>  ****
>
>
> GDF SUEZ Mail Disclaimer:
> http://www.gdfsuez.com/disclaimer/disclaimer-fr.html****
>
> ** **
>
>
> GDF SUEZ Mail Disclaimer:
> http://www.gdfsuez.com/disclaimer/disclaimer-fr.html****
>
>
> GDF SUEZ Mail Disclaimer:
> http://www.gdfsuez.com/disclaimer/disclaimer-fr.html
>
>
> _______________________________________________
> TRNSYS-users mailing list
> TRNSYS-users at cae.wisc.edu
> https://mailman.cae.wisc.edu/listinfo/trnsys-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.onebuilding.org/pipermail/trnsys-users-onebuilding.org/attachments/20111116/50e9a638/attachment-0001.htm>


More information about the TRNSYS-users mailing list