Page 5 of 23 FirstFirst 123456789101112131415 ... LastLast
Results 41 to 50 of 223

Thread: Beginning of an Automatic Climate Control System, all juiced up on Fusion

  1. #41
    FLAC
    Join Date
    Oct 2006
    Location
    Las Vegas
    Posts
    1,286
    Ok, update time.
    I've come a long way, working on the backside of the skin.
    I've continued on what I was doing in the last few threads a bit, and have a very basic control model working (.exe). I've been working on getting the Modernity climate control skin going on the new software.

    I've applied thermodynamics theory to Automotive HVAC, and come up with the governing equations for each major aspect of a passenger cabin heat balance. For those of you who have a thermodynamics background, you'll know that there are some design aspects, variables in each equation that aren't known, aren't available in service manuals. I've come up with a series of self tests that will be performed initially and periodically (automatically with the software) using installed sensors (some have to be added for conversion from manual HVAC to automatic, but nothing not found in typical automatic HVAC cars). These self tests will determine the unknowns, and constantly fine tune these constants, accounting for test errors and changes like window tinting, weatherstripping leaks, paint jobs, etc. So far the theory behind these tests is pretty solid and I really think it will work in real life.

    From here, I will apply these constants and sensed inputs to a series of functions that will provide top notch automatic control of our HVACs.
    I have coming in the mail a complete airbox, fan, evaporator, heater, servo, and actuators for the testing that I will need to do to verify my work. I hate working under the dash!
    So if there's something related, that you think should go with HVAC controls, let me know.

    Here's an example of the a modeled result of one of the tests:

    A 3 dimensional array for the Blend door position as required for controlling the amount of air going through the heater, found at each fan speed.

    Hey 2KToaster, I'd really like to have the means to fill up, save to file, modify, and access a multi-dimensional array, or equivalent, through the skin. But at this point, no hurry. If it's on the list, I'd be happy.

  2. #42
    FLAC
    Join Date
    Oct 2006
    Location
    Las Vegas
    Posts
    1,286
    Well, I'm still at it. The biggest thing I have been working on is coming up with a means to get a reliable blower flow rate. The air box is here, it comes with an evaporator and a blower, so now I have a spare blower (2 actually). I'll be setting this up as a test bench.

    The mode doors work almost the same as the picture showed, but there are some things that baffle me a little, meaning, I wouldn't have done it that way. Just by studying the door arrangement and the actuator sequencing chart I made from observing my truck in each mode, I learned a lot; most of which is about how the evaporator air(without heat) is used in heat/defrost, and how little heat flow is used when heat comes out of the panels. I'll elaborate a little on that when I get a little further.

    These are going to be part of my new test bench:








    One of the directives of this project is to utilize only sensors found in modern automatic control systems. But I'm worried about getting a good flow signal. Currently Mass flow rate will be derived roughly as follows(I'm not going to bore everyone with the little details...too much):
    With the evaporator off and at steady state conditions:

    Mflow = (Toutlet-Tinlet)c/UA(Tcoolant-((Tinlet+Toutlet)/2))

    But UA was originally to be determined similarly. It's to be a compound constant (area and overall heat transfer coeffecient).

    When I started I intended to use an anemometer at the recirc to come up with a fan curve and use those values. But then as I got further into things (especially after the box showed up) I noticed that there are several dynamic influences on system resistance. In addition to the effect of changing the mode, the heater door will greatly affect system resistance. And still manufacturers fan curves are no where to be found, and still, I am not some big company with big computational flow dynamics modeling software here.

    In fact the goal is to make the software 'system independant'. I don't want to do this just for myself.

    I want to do this through a system that can be used for other means as well, and applied to any application. Because of that I've spent a lot of time lately working on programming, and I am by no means a programmer. I'm at chapter 18 now in my C# book, ''enumerating collections" yuck. some really abstract thoughts, but very useful. I've been seeing how to accomplish things as I do the labs. I still think a pure object oriented approach is the way to do the software:

    GUI would only talk to a process and processes drive outputs and retrieve inputs, they would be classes in a heirarchical structure so that they would be filled themselves with objects, and the types of objects would dictate what they do, some would take up to 4 inputs and or them, some would add up to 4 inputs etc. Any number of processes would be able to be linked together by the internal objects inputs and outputs. A minimal process would be one that just took an input (GUI event) and delivered and ouput (digital out), 2 objects within a process, processed in the order they are specified. If it were done right it would then seem easy to: fill out the required object's fields(input, output, constants, maybe a simple mathematical expression), put it in the right process and let it do its job.
    I imagine there could be a pretty basic configuration utility for a user to build/edit these objects and the processes they are within, and then save them to a database to be loaded each time the software starts.
    I know it's hard, I am working on it though, I'm not about to try and steer Nick in yet another direction, I just don't want to end up writing skin code that is cascaded 3/4 of the way across the page. (This is the direction I meant to steer in all actuality)

    BTW, anyone else interested in this project? anyone interested in working with me on it? I'm not talking about money and entreprenuership here, as I'm dedicated to using the fusion brain, it's just a really big project, and I've only slowly chipped away on it (nothing else really on my plate).

  3. #43
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    Well if you need help with the code let me know.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  4. #44
    FLAC
    Join Date
    Oct 2006
    Location
    Las Vegas
    Posts
    1,286
    I've had a few questions about interfaces, and then later delegates (general stuff, I've seen your help in coders corner) but I think after the 15th or so time through each of those chapters, and examples I've finally got it. But it's a different game entirely, I'm sure, when you're not working someone else's guided example.
    I hope to start defining classes in my process/function relational heirarchy as the first step in this, I'll have questions (frustrations) soon.
    It figures my getting my feet wet would be something so daunting. How appropriate for me.


    With FCC, I'm just worried about working with the kind of complex continuous control methods, using that low(er) language style xml language, and how to accomplish some of this stuff with it. I'm going to try but...for instance, The process is at this point, intended to save dynamically learned constants. How would I do that with Uber xml code? I'm still not sure how to do that one equation up there^ with the skin laguage.

  5. #45
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    It is very easy.

    If you want to set a predefined variable, then that goes in all variables (The constants for cabin volume and such). As in C#, there are no such things as "constants", just dont assign the variable anything, just retrieve the value. I never saw the value of constants anyways unless it is a group of like 20 developers piecing code together it is good for debugging...

    And the code is run fast, and well actually. I cannot monitor the entire evaluation process code using the TimeSpan value because it is less than the minimum time span to monitor it is that fast...

    As for getting functions to wacky-my-xml-code, I am willing to help. It is simple once you get it. Maybe be easier for you to understand from a coding point of view. Basically, it looks at an if node's children. If the child is "parameter1" or "parameter2" it passes it through the same function. and it keeps passing itself in recursively until it gets to something that can be evaluated or retrieved. So nested things are like the inners of a "()" in math.

    so "Mflow = ((Toutlet-Tinlet)*c)/(UA*(Tcoolant-((Tinlet+Toutlet)/2)))"

    Code:
          <if fire_on="logic">
            <parameter1>
              <variable do="set" name="Mflow">
                <operation type="divide">
                  <parameter1>
                    <operation type="multiply">
                      <parameter1>
                        <operation type="subtract">
                          <parameter1>
                            <variable do="get" name="Toutlet"></variable>
                          </parameter1>
                          <parameter2>
                            <variable do="get" name="Tinlet"></variable>
                          </parameter2>
                        </operation>
                      </parameter1>
                      <parameter2>
                        <variable do="get" name="c"></variable>
                      </parameter2>
                    </operation>
                  </parameter1>
                  <parameter2>
                    <operation type="multiply">
                      <parameter1>
                        <variable do="get" name="UA"></variable>
                      </parameter1>
                      <parameter2>
                        <operation type="subtract">
                          <parameter1>
                            <variable do="get" name="Tcoolant"></variable>
                          </parameter1>
                          <parameter2>
                            <operation type="divide">
                              <parameter1>
                                <operation type="add">
                                  <parameter1>
                                    <variable do="get" name="Tinlet"></variable>
                                  </parameter1>
                                  <parameter2>
                                    <variable do="get" name="Toutlet"></variable>
                                  </parameter2>
                                </operation>
                              </parameter1>
                              <parameter2>
                                <number>2</number>
                              </parameter2>
                            </operation>
                          </parameter2>
                        </operation>
                      </parameter2>
                    </operation>
                  </parameter2>
                </operation>
              </variable>
            </parameter1>
          </if>

    It is not pretty, but it is very powerful.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  6. #46
    FLAC
    Join Date
    Oct 2006
    Location
    Las Vegas
    Posts
    1,286
    Thank you, that actually does help a lot. My faith is renewed a bit. Good thing I just finished that binary tree example, otherwise that 'passing into itself recursively' would have gone right by me. Is that in the ReadConfiguration.cs file?

    When I spoke of constants, I need to use them as representations of charactaristics of the system that can not be measured easily, but will tune in after many tests. So they are going to be living constants, If this all turns out like I'm seeing in my head.

    After this, who's up for re-engineering an engine control unit with the brain?

    Quote Originally Posted by 2k1Toaster View Post
    If you want to set a predefined variable, then that goes in all variables (The constants for cabin volume and such). As in C#, there are no such things as "constants", just dont assign the variable anything, just retrieve the value. I never saw the value of constants anyways unless it is a group of like 20 developers piecing code together it is good for debugging...
    can you elaborate a bit, I'm not sure I follow.

  7. #47
    FLAC
    Join Date
    Oct 2006
    Location
    Las Vegas
    Posts
    1,286
    And that speed thing is an important factor, I'm sure you're aware of (by remembering back to when you were first learning) how unaware I am of how my programming ideas are going to affect speed, or speed and program performance in general.

  8. #48
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    Quote Originally Posted by h3rk View Post
    Thank you, that actually does help a lot. My faith is renewed a bit. Good thing I just finished that binary tree example, otherwise that 'passing into itself recursively' would have gone right by me. Is that in the ReadConfiguration.cs file?

    When I spoke of constants, I need to use them as representations of charactaristics of the system that can not be measured easily, but will tune in after many tests. So they are going to be living constants, If this all turns out like I'm seeing in my head.

    After this, who's up for re-engineering an engine control unit with the brain?



    can you elaborate a bit, I'm not sure I follow.
    It is found in "FunctionEvaluator.cs". The big ol' function of doom.

    And now I see what you mean. You want a varaible to be initialized, and then modified, and saved to non-volatile storage correct? So the next time it starts, it would be the same... Hmmm... I will have to give this thought, but I think it can be done without too much work.

    And I am trying to incoorporate what I can to help you out with this as I think this will be invaluable in the future for everyone. Also most of the re-write was inspired by you, so I sort of want it to be used!

    As for the constants, I thought I had read somewhere that constants in C# are not really constants as they are in C or C++. I never use them anyways.
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  9. #49
    Fusion Brain Creator 2k1Toaster's Avatar
    Join Date
    Mar 2006
    Location
    Colorado, but Canadian!
    Posts
    10,049
    Quote Originally Posted by h3rk View Post
    And that speed thing is an important factor, I'm sure you're aware of (by remembering back to when you were first learning) how unaware I am of how my programming ideas are going to affect speed, or speed and program performance in general.
    The best way is to try and remember how much memory everything takes... When you are initializing variables. For instance, if you initialize a variable to be used in a for loop, inside the loop, that is a lot of wasted time rather than if you were to initialize it outside of the loop and then just set its value different each time. But these things are negligable now. This was more important in the days of the "turbo button".

    A good way to see though is make a DateTime object at the beginning of the code. Then when you want to see how long, make a "Console.WriteLine(DateTime.Now.Subtract(oldDateTi me).ToString())" and it will print out the time it took from when the previous DateTime was initialized to "now"
    Fusion Brain Version 6 Released!
    1.9in x 2.9in -- 47mm x 73mm
    30 Digital Outputs -- Directly drive a relay
    15 Analogue Inputs -- Read sensors like temperature, light, distance, acceleration, and more
    Buy now in the MP3Car.com Store

  10. #50
    FLAC
    Join Date
    Oct 2006
    Location
    Las Vegas
    Posts
    1,286
    Quote Originally Posted by 2k1Toaster View Post
    And now I see what you mean. You want a varaible to be initialized, and then modified, and saved to non-volatile storage correct? So the next time it starts, it would be the same... Hmmm... I will have to give this thought, but I think it can be done without too much work.
    Exactly...It's not likely to be used by many others though, I expect.


    Quote Originally Posted by 2k1Toaster View Post
    And I am trying to incoorporate what I can to help you out with this as I think this will be invaluable in the future for everyone. Also most of the re-write was inspired by you, so I sort of want it to be used!
    I plan to, did you get what I meant about the purist OOP approach, I wish I could show you how this DCS works, next you're in Vegas, let me know if you're interested, I'll show you more of what I'm talking about (it's hard to explain it this way). We're in the middle of an upgrade and now have some really cool new stuff, that is all about what we're doing, only it's highly polished, and I'm the one guy here that's really into it's inner workings.

Similar Threads

  1. AIMEE Climate Control POLL
    By Danceheaven in forum Software & Software Development
    Replies: 25
    Last Post: 01-14-2010, 10:38 AM
  2. Replies: 85
    Last Post: 07-09-2007, 05:44 AM
  3. Digital dash and climate control???
    By yamathegreat in forum General Hardware Discussion
    Replies: 3
    Last Post: 10-31-2005, 05:41 PM
  4. System control wire on amp
    By dudah85 in forum General Hardware Discussion
    Replies: 3
    Last Post: 09-13-2001, 09:09 AM
  5. Replies: 22
    Last Post: 08-13-2001, 02:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •