How the torque is calculate between an interval of points

Information about the inner-side magic

Moderator: kilo

How the torque is calculate between an interval of points

Postby nonobecane » Sat Feb 07, 2015 3:13 pm

How the torque is calculate between an interval of points ?
I try to make an electrical car with a constant torque

In the section engine if i wrote :
Code: Select all
      <section name="data points">
         <section name="1">
            <attnum name="rpm" unit="rpm" val="1"/>
            <attnum name="Tq" unit="N.m" val="300"/>
         </section>
         <section name="2">
            <attnum name="rpm" unit="rpm" val="5000"/>
            <attnum name="Tq" unit="N.m" val="300"/>
         </section>
      </section>

The engine behavior is not the same than if i wrote :
Code: Select all
      <section name="data points">
         <section name="1">
            <attnum name="rpm" unit="rpm" val="1"/>
            <attnum name="Tq" unit="N.m" val="300"/>
         </section>
         <section name="2">
            <attnum name="rpm" unit="rpm" val="100"/>
            <attnum name="Tq" unit="N.m" val="300"/>
         </section>
         <section name="3">
            <attnum name="rpm" unit="rpm" val="500"/>
            <attnum name="Tq" unit="N.m" val="300"/>
         </section>
         <section name="4">
            <attnum name="rpm" unit="rpm" val="1000"/>
            <attnum name="Tq" unit="N.m" val="300"/>
         </section>
         <section name="5">
            <attnum name="rpm" unit="rpm" val="1500"/>
            <attnum name="Tq" unit="N.m" val="300"/>
         </section>
         <section name="6">
            <attnum name="rpm" unit="rpm" val="2000"/>
            <attnum name="Tq" unit="N.m" val="300"/>
         </section>
         <section name="7">
            <attnum name="rpm" unit="rpm" val="2500"/>
            <attnum name="Tq" unit="N.m" val="300"/>
         </section>
         <section name="8">
            <attnum name="rpm" unit="rpm" val="3000"/>
            <attnum name="Tq" unit="N.m" val="300"/>
         </section>
         <section name="9">
            <attnum name="rpm" unit="rpm" val="3500"/>
            <attnum name="Tq" unit="N.m" val="300"/>
         </section>
         <section name="10">
            <attnum name="rpm" unit="rpm" val="4000"/>
            <attnum name="Tq" unit="N.m" val="300"/>
         </section>
         <section name="11">
            <attnum name="rpm" unit="rpm" val="4500"/>
            <attnum name="Tq" unit="N.m" val="300"/>
         </section>
         <section name="12">
            <attnum name="rpm" unit="rpm" val="5000"/>
            <attnum name="Tq" unit="N.m" val="300"/>
         </section>
      </section>


Thanks for your answers
Image SD2 svn / Debian Sid 64 / 1920x1080 on GTX580 / Logitech G25
nonobecane
 
Posts: 29
Joined: Sat Jan 04, 2014 10:20 am
Location: France

Re: How the torque is calculate between an interval of point

Postby simon-2 » Sun Feb 08, 2015 3:29 am

that sounds strange..? even if i don't know the corresponding code, i think all common means of interpolation (linear or xth order) should give the same result in this case..?
simon-2
 
Posts: 83
Joined: Thu Jan 29, 2015 3:01 pm

Re: How the torque is calculate between an interval of point

Postby Sumer » Fri Feb 13, 2015 6:03 am

Hi,

This is exceptionally decent and wonderful post.
I am very happy joined this forum.
I like it exceptionally much....!!!!


Thanks alot...
We offer guaranteed success for Pass4sure 500-285 exam with help of latest network+ questions certification and jhu practice questions and the exams of Tabor College
Sumer
 
Posts: 1
Joined: Fri Feb 13, 2015 5:57 am

Re: How the torque is calculate between an interval of point

Postby simon-2 » Fri Feb 13, 2015 9:39 pm

have a look at engine.cpp:

Code: Select all
Tq_max = engine->rads * curve->data[i].a + curve->data[i].b;


thus linear interpolation where a and b are previously eveluated:

Code: Select all
data->a = (edesc[i+1].tq - edesc[i].tq) / (edesc[i+1].rpm - edesc[i].rpm);
data->b = edesc[i].tq - data->a * edesc[i].rpm;


so a is slope between two points (which should always be 0 in your case), b is corresponding y-intercept (which should always be 300 in your case).

This is the same for simuv4 and simuv2.1, so i still wonder why you get different results..?
simon-2
 
Posts: 83
Joined: Thu Jan 29, 2015 3:01 pm

Re: How the torque is calculate between an interval of point

Postby nonobecane » Mon Feb 16, 2015 6:08 pm

Thank you Simon for yout answer.

Me too, I don't know why...
I test with simu v4
In the first example the car is uncontrollable, the engine climbs slowly between 0 to ~1500 rpm and after it takes instantly 5000rpm
Also I test with a third point at 1500rpm :
Code: Select all
      <section name="data points">
         <section name="1">
            <attnum name="rpm" unit="rpm" val="1"/>
            <attnum name="Tq" unit="N.m" val="300"/>
         </section>
         <section name="2">
            <attnum name="rpm" unit="rpm" val="1500"/>
            <attnum name="Tq" unit="N.m" val="300"/>
         </section>
         <section name="3">
            <attnum name="rpm" unit="rpm" val="5000"/>
            <attnum name="Tq" unit="N.m" val="300"/>
         </section>
      </section>
Then the engine climbs slowly between 0 to ~3000 rpm and after it takes instantly 5000rpm

mystery and gumdrop (it's a french expression :D )
Image SD2 svn / Debian Sid 64 / 1920x1080 on GTX580 / Logitech G25
nonobecane
 
Posts: 29
Joined: Sat Jan 04, 2014 10:20 am
Location: France


Return to SD Physics & Internals

Who is online

Users browsing this forum: No registered users and 1 guest