LocostUSA.com

Learning how to build Lotus Seven replicas...together!
It is currently February 1, 2023, 3:54 pm

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: December 26, 2014, 10:33 am 
Offline

Joined: March 10, 2006, 12:48 am
Posts: 294
Location: CT
EDIT: 2/13/15: I made some improvements to the logic. Check the zip for the inputs_213.m file.

Here's a MATLAB based suspension geometry analyzer I wrote. I'll edit the first post with answers to questions, or subsequent updates to the code.

You can get Octave (free) here: http://mxeoctave.osuv.de/octave-3.8.2-4-installer.exe

Directions (please let me know if these don't do the trick and we'll work through it)
-Install Octave from the link above. You want to use this version since it's Windows compatible (I tested it on 7 and 8) and includes a GUI (graphical user interface). The latest public Windows release doesn't have the GUI, and QT Octave (the one I used a few years ago and loved.....) is no longer supported.
-When installing, let Octave register the *.m extension.
-After installing, run the "Experimental GUI Octave" version.
-Once you're in, you'll see a file browser on the left column, navigate to the folder where you unzipped the optimzer. (double click on the folder to open it)
-Double click on inputs.m. This will open the main optimizer file where you can edit your inputs and the optimizer parameters. It'll open in the right window (notice the tabs on the bottom of the screen "Command Window/Editor/Documentation".
-Once you're satisfied with the edits you made, hit F5. This will save the modified inputs file and run it. I recommend renaming yours so you have the original, and one for the front and one for the rear. It'll make doing iterations way easier.
-After you hit F5 (or click run), click on the command window tab I explained above. Now you wait. It'll take 10-15 minutes to run (much faster in MATLAB, but Octave must either just be slower or is using fewer cores maybe? If somebody has an idea how to speed this up, I'm listening). You'll get a series of warnings, but you don't need to worry. The error is caused by the program trying to take the inverse of of a singular matrix, and also division by zero. If you're using real values for caster and anti-dive, you won't get any errors.
-When the program is done, the results will appear in the command window. Post up your results and we can expand on what they mean and if there are any changes to your boundary conditions that will improve your results.



EDITED: Original Post Below
Alright, I should probably share this with the community. I wrote a suspension geometry optimizer for a graduate project in MATLAB. It allows the user to input their desired: tire size, wheel offset, static camber, caster, lower control arm mount limits, ride height, and spindle dimensions. You can change the weight of the various outputs to your desired design constraints. In my case, I wanted to minimize roll center migration (vertical and lateral) while maintaining negative camber at 3 degrees roll. It can do anti-dive as well (and I can make it do anti-squat for the rear if anyone is interested...), but the "anti" portion needs some work.* (geeky explanation below)

The output of the program is a set of points in that you can use to set the axes of your control arms relative to the wheel position. If there's interest in the program, I need to spend a little time cleaning up the outputs and maybe having it write to an excel file so it's easier to interpet. If there's no interest, then I won't spend the time doing that (or if you're OK with MATLAB you can easily figure how it's displaying the results).

*Anti effects are a function of the inclination of the upper and lower control arms. As such, if we generate a random inclination of the UCA, there is only one inclination of the LCA that gets the desired anti effect. The optimizer is built to run a random set of locations within the design space and choose the best. To get better results, the optimizer should be run, and a correlation derived for the LCA angle as a function of the randomly generated UCA angle. I did this for a few points, but didn't bother writing the code to do this automatically (shouldn't be too hard, just didn't have the time or motivation when I was doing the project, and it's suitable for my needs as is).


You do not have the required permissions to view the files attached to this post.


Last edited by Andy Bro on February 13, 2015, 7:42 pm, edited 5 times in total.

Top
 Profile  
Reply with quote  
PostPosted: December 26, 2014, 1:01 pm 
Offline
Toyotaphobe
User avatar

Joined: April 5, 2008, 2:25 am
Posts: 4839
Location: Fort Worth, Texas
I would be interested. What OS does it run on? I sure wish there was a program for iPad somewhere.

Unless I'm reading this wrong, your program is built to tell you what dimensions to use if you want X results, correct?

_________________
mobilito ergo sum
I drive therefore I am

I can explain it to you,
but I can't understand it for you.


Top
 Profile  
Reply with quote  
PostPosted: December 26, 2014, 1:15 pm 
Offline
User avatar

Joined: July 29, 2006, 9:10 pm
Posts: 3145
Location: Oregon, usually
Plus one on interested, but I fear it is over my head. I suspect the members here who are "...okay with MATLAB..." are a small minority, and your biggest challenge will be documentation (to quote Desi Arnez, You've got some 'splainin' to do).

Unless I'm reading this wrong, the user defines the desired results, and the spindle assembly and the lower control arm, and the program runs through a bunch of UCA iterations and find the best dimensions/location for it. Did I get that right?

Will this be stand alone or will we need to have our own (ka-ching! $2150...though there's a student version for $99 if you're a student and can prove it) copy of MATLAB?

_________________
Locost builder and adventurer, and owner/operator of http://www.kineticvehicles.com


Top
 Profile  
Reply with quote  
PostPosted: December 26, 2014, 2:15 pm 
Offline

Joined: March 10, 2006, 12:48 am
Posts: 294
Location: CT
MATLAB is the commercially available language, but there is an open source equivalent called Octave. Octave is native to Linux, but there are some Windows versions out there. I'll have to dig up my old laptop, but I'm pretty sure the one I used to use was QTOctave, free of course.

The second picture has the required inputs. I should have made a slick interface for it, but it's embedded in the section of the code.

OK, I'll spend a little time tonight cleaning up the results presentation part of the program and post it up. It's very easy to use, especially when I change the output from dumping a bunch of data to something formatted.


Last edited by Andy Bro on February 14, 2015, 5:07 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: December 26, 2014, 5:36 pm 
Offline

Joined: March 10, 2006, 12:48 am
Posts: 294
Location: CT
I think it's good to go. I'll edit the first post with the files and details. If you have problems or questions, give me a shout and I'll try to help you out.


Top
 Profile  
Reply with quote  
PostPosted: December 26, 2014, 7:02 pm 
Offline

Joined: March 10, 2006, 12:48 am
Posts: 294
Location: CT
Just uploaded it. I'm running the version of Octave I linked, its considerably slower than MATLAB, but still way faster than running individual data sets.


Top
 Profile  
Reply with quote  
PostPosted: December 26, 2014, 10:10 pm 
Offline
User avatar

Joined: October 23, 2010, 2:40 am
Posts: 1389
Andy, Thanks for sharing/posting your optimizer. I will be uploading after the holidays to see how my pivots fair vs. the optimized ones.

You may already have it documented in the upload, but would you define the coordinate system? These are the Wishbone definitions, yours may differ:

X = Distance fore and aft of front wheel centers, positive forward
Y = Distance above ground plane
Z = Distance outboard from chassis centerline

Also interested in more info on how to obtain anti-dive anti-squat results.

Thanks for your efforts on this.

_________________
Cheers, Tom

My Car9 build: viewtopic.php?f=35&t=14613
"It's the construction of the car-the sheer lunacy and joy of making diverse parts come together and work as one-that counts."

Ultima Spyder, Northstar 4.0, Porsche G50/52


Top
 Profile  
Reply with quote  
PostPosted: December 26, 2014, 11:11 pm 
Offline

Joined: March 10, 2006, 12:48 am
Posts: 294
Location: CT
seattletom wrote:
Andy, Thanks for sharing/posting your optimizer. I will be uploading after the holidays to see how my pivots fair vs. the optimized ones.

You may already have it documented in the upload, but would you define the coordinate system? These are the Wishbone definitions, yours may differ:

X = Distance fore and aft of front wheel centers, positive forward
Y = Distance above ground plane
Z = Distance outboard from chassis centerline

Also interested in more info on how to obtain anti-dive anti-squat results.

Thanks for your efforts on this.


Here's the coordinate system, ....... Shucks, can't upload files >2mb. PM me and I'll email you the report...and a draft (I'll upload the final copy after I get back to work in the new year) of the thesis if you're exceptionally bored and want to know what's going on the background. If you skip to the results discussion, you'll see the scatter caused by the anti-dive goal influencing the overall "goal". I walked through the steps needed to refine the analysis. The lines that you'll need to play with are around line 255. We let the optimizer pick a random UCA height and side view inclination, then solve for the rear LCA height to get the optimal anti-dive for any given upper control arm. I did this by creating an excel file with a bunch of the relevant information, and did a linear regression to get the formula for LCAR(z)=(UCAF(z)-UCAR(z))*M+B.

I should figure out how to set a toggle so you can tell it to do either anti-squat or anti-dive.


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
Reply with quote  
PostPosted: December 26, 2014, 11:57 pm 
Offline
Toyotaphobe
User avatar

Joined: April 5, 2008, 2:25 am
Posts: 4839
Location: Fort Worth, Texas
So will it work on windows 7 (I think)?

_________________
mobilito ergo sum
I drive therefore I am

I can explain it to you,
but I can't understand it for you.


Top
 Profile  
Reply with quote  
PostPosted: December 27, 2014, 8:53 am 
Offline

Joined: March 10, 2006, 12:48 am
Posts: 294
Location: CT
It should work on 7. I'm using Windows 8 and downloaded Octave from the link above and it worked. Tom is having some problems, so I'm going to try it on a different machine and see if I can recreate the error.


Top
 Profile  
Reply with quote  
PostPosted: December 28, 2014, 10:31 pm 
Offline

Joined: July 17, 2010, 9:56 am
Posts: 29
This is relevant to my interests. I'll have to play around with it sometime soon, maybe on the school's computers or put matlab back on my home pc.


Top
 Profile  
Reply with quote  
PostPosted: February 7, 2015, 6:14 pm 
Offline
User avatar

Joined: December 19, 2005, 9:29 pm
Posts: 111
Location: S.F . Bay Area
Hi I just started to play around with this. I have some questions about how to measure inputs for the inputs.m file. Lines6-10 there is no confusion on those entries
06-caster=7;
07-static_camber=1.2;
08-wheel_offset=-1.5;
09-wheelbase=98;
10-brake_bias=65;

11-frame_width=15; is this the width of the bottom of the frame or width of lca inboard lbj, not measured from the chassis centerline

12-track_width=57;
13-tire_diameter=23;

14-hub_lbj_vert=3.75; where is this measured from? from ground plane up? from the axle centerline?

15-hub_lbj_horz=4.5; where is this measured from? from hub face?

16-hub_ubj_vert=4.75; where is this measured from? from ground plane up? from the axle centerline?

17-hub_ubj_horz=5.875; where is this measured from? from hub face?

18-%what is the desired height of the LCA mounts from the frame

19-lca_height_min=2.5;is this defining suspension travel? inboard pick up points?

20-lca_height_max=4;is this defining suspension travel? inboard pick up points?

21-cg_height=16;

22-body_roll=3;

Thanks for giving this to the community! I'm going to use the h**l out of it if I can figure out how to use it.
Justin

_________________
http://www.lightningbugcars.com/


Top
 Profile  
Reply with quote  
PostPosted: February 11, 2015, 6:41 pm 
Offline

Joined: March 10, 2006, 12:48 am
Posts: 294
Location: CT
I thought I was subscribing to my thread, but I guess I wasn't. Fixed that now.

To answer your questions:
I did some work on the program last month and didn't update the file. That computer is down for a few more days, but I'll update the first post with the new files when my motherboard gets here.

Frame width is the width between the LCA mounts.
Vertical spindle measurements are from axle centerline, horizontal is from the hub face.
Lines 19-20 are setting the height from the bottom of the frame to the LCA mounts. This is one of the features I refined. The idea is to set an allowable height range for the LCA mounts, in the same manner that there are allowable ranges for height and width of UCA mounts.

I'm happy to see someone try to use the code.
-Andy


Top
 Profile  
Reply with quote  
PostPosted: February 13, 2015, 8:02 pm 
Offline

Joined: March 10, 2006, 12:48 am
Posts: 294
Location: CT
Updated the zip file with an improved input routine.


Top
 Profile  
Reply with quote  
PostPosted: February 13, 2015, 8:23 pm 
Offline

Joined: October 19, 2009, 9:36 pm
Posts: 2183
Location: meadview arizona
i wish i knew what this is all about, its as confusing to me as megasquirt and quantum physics or string theory.

i still don't believe in electricity, you can't smell it, see it, hear it and when you touch it all you feel is its effects not the substance itself.

i'm sure that if i was 30 years younger, then this would be wonderful and very useful in suspension design.

god i feel old!!!

_________________
this story shall the good man teach his son,
and chrispin chrispian shall ne'er go by,
from this day to the end of the world.
but we in it shall be remembered.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 25 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
POWERED_BY