The MP3car.com Store The MP3car.com Store    

Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > General Hardware Discussion > Fusion Brain

Reply
 
LinkBack Thread Tools Display Modes
Old 11-17-2007, 05:30 PM   #31
FLAC
 
Join Date: Oct 2006
Location: Las Vegas
Posts: 1,286
Quote: Originally Posted by 2k1Toaster View Post
When you put it in a class, you have to create an instance of it.

public class Blah {

public Blah() {
return;
}

public bool BlahThing(bool input) {
return input;
}
}

then in the main section you need:

Blah myBlah = new Blah();
bool returnValue = myBlah.BlahThing(true);


Thanks a bunch, that worked. I guess I was calling the class.method wrong and not building the instance right.

That definately helped me a little better than the books I'm using, for some reason.

All that and I think I have the timer class down a little better, after seeing how you used it.

I think that flap moving all on it's own is coming sooner than later.
h3rk is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Old 11-17-2007, 10:34 PM   #32
Fusion Brain Creator
 
2k1Toaster's Avatar
 
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,442
Yeah when I first started I had no idea how to use a class. Still to this day though, I dont understand using classes for things a regular method can do. The only time I use them is for obviously different pages, then custom types (like the Digital Outs, Anal. Ins, and Dig. Ins), and things that are the same that would be good to use on different pages (like a dec to binary string converter type thing).

The 1 class I took in C#, the professor was obsessed with classes. Drove me crazy. Had to make a class just to get/set a variable and add/subtract... Useless. Like Calculator class and then myCalcClass.Subtract(int a, int b)... Why not just a - b. So much simpler. That guy really ****ed me off.
2k1Toaster is offline   Reply With Quote
Old 11-18-2007, 12:49 AM   #33
FLAC
 
Join Date: Oct 2006
Location: Las Vegas
Posts: 1,286
***deletes his new calculator class in shame...***
h3rk is offline   Reply With Quote
Old 11-18-2007, 12:57 AM   #34
Fusion Brain Creator
 
2k1Toaster's Avatar
 
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,442
Quote: Originally Posted by h3rk View Post
***deletes his new calculator class in shame...***



me.Laugh(true);


2k1Toaster is offline   Reply With Quote
Old 11-18-2007, 04:36 AM   #35
FLAC
 
Join Date: Oct 2006
Location: Las Vegas
Posts: 1,286
While working on the heat transfer alg's I had an interesting thought. The OEM's take into account the shell of the car for conduction heat transfer, and the glass area for sun radiated heat transfer to tune their heat balance alg's that determine fan speed and door position. Glass plays a part in both of those factors. both in transparence and in coefficient of heat transfer. One trip to the local tint shop and we screw that all up. With this, we'll be able to tune for it
h3rk is offline   Reply With Quote
Old 11-18-2007, 04:38 AM   #36
Fusion Brain Creator
 
2k1Toaster's Avatar
 
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,442
You going to put a photosensor on the inside of the car, and outside and measure the difference to get your tint value? Or just measure from the inside as that is the light coming through?

EDIT: and you sure are up late!
2k1Toaster is offline   Reply With Quote
Old 11-18-2007, 04:53 AM   #37
FLAC
 
Join Date: Oct 2006
Location: Las Vegas
Posts: 1,286
I'm not sure that will allow me to compare apples and apples. There will be some info the user (or me somehow enetering it in table format for each model) gathering cabin volume and glass area. Then I hope by monitoring temperature changes over time, the other coefficients,fan curves, constants, etc. can be determined by analyzing what data can be obtained. Start the car park it in the shade and when coolant temp is right and whatnot, push the 'calibrate' button. After some time it may prompt for another run with different conditions. Once the coefficients are obtained, maybe only slight tuning would be required later, and the car would be ready to tackle dynamic situations like everyday use, using those constants, sunload, and temps to drive the door and the fan automatic-style.

And I might add so are you

Edit: I want to let it be known that I'm not ignoring humidity, but right now I have enough on my plate, that will come with time, it all will.

Last edited by h3rk; 11-18-2007 at 05:15 AM.
h3rk is offline   Reply With Quote
Old 11-18-2007, 11:28 AM   #38
Low Bitrate
 
Join Date: Mar 2007
Posts: 70
For what ever it's worth, I have some experience working with models and I have found that the easiest way to play with them is to use excel.

Can you tell me about your solenoid module? Where did you get it?
mustanglou is offline   Reply With Quote
Old 11-18-2007, 03:19 PM   #39
FLAC
 
Join Date: Oct 2006
Location: Las Vegas
Posts: 1,286
Quote: Originally Posted by mustanglou View Post
For what ever it's worth, I have some experience working with models and I have found that the easiest way to play with them is to use excel.

Can you tell me about your solenoid module? Where did you get it?

I got it at rockauto.com for $54, it's AC-Delco PN: 15-72182.

I've seen modeling done in excel, and that is the first place I put the alg's to see what they should be, then I put it in the prog to see how it can be implemented.
h3rk is offline   Reply With Quote
Old 11-22-2007, 01:31 AM   #40
Fusion Brain Creator
 
2k1Toaster's Avatar
 
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,442
First of the Uber Edition: http://www.mp3car.com/vbulletin/soft...ml#post1144574

If there is a graphic element in your skin that could be made easier let me know. I havent included labels or the equivalent of dead images yet. And I am still building the control options (what to do when clicked).
2k1Toaster is offline   Reply With Quote
Old 11-25-2007, 04:28 PM   #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.

Last edited by h3rk; 11-25-2007 at 08:19 PM.
h3rk is offline   Reply With Quote
Old 12-09-2007, 03:29 AM   #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).
h3rk is offline   Reply With Quote
Old 12-09-2007, 03:41 AM   #43
Fusion Brain Creator
 
2k1Toaster's Avatar
 
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,442
Well if you need help with the code let me know.
2k1Toaster is offline   Reply With Quote
Old 12-09-2007, 04:04 AM   #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.

Last edited by h3rk; 12-09-2007 at 04:42 AM.
h3rk is offline   Reply With Quote
Old 12-09-2007, 04:43 AM   #45
Fusion Brain Creator
 
2k1Toaster's Avatar
 
Join Date: Mar 2006
Location: Colorado, but Canadian!
Posts: 7,442
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.

Last edited by 2k1Toaster; 12-09-2007 at 04:45 AM.
2k1Toaster is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
can a carputer replace a high end av dedicated system? turbocad6 Car Audio 85 07-09-2007 04:44 AM
Digital dash and climate control??? yamathegreat General Hardware Discussion 3 10-31-2005 04:41 PM
AIMEE Climate Control POLL Danceheaven Software & Software Development 19 08-21-2005 06:19 AM
System control wire on amp dudah85 General Hardware Discussion 3 09-13-2001 08:09 AM
My hardware/Software computer control system - Wish list/feedback - Easy power off DarkWolf General Hardware Discussion 22 08-13-2001 01:42 PM


All times are GMT -5. The time now is 01:42 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics