LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

control and simulation loop problem

Solved!
Go to solution

Hello All,

 

Im undergoing a project where I'm creating a simplified model of an engine powertrain. In the next paragraph I will go through briefly how I'm going about it but I'm not too sure if that will help you solve the problem I'm having. To be honest it probably will, be I understand you're all busy people.

 

 The basics behind it are that an initial RPM is feed into an equation which describes the torque curve. An initial torque is gathered from this and then using the appropriate gear ratio this is multiplified, friction losses are very crudely taken into account (currently searching for a better way to implement friction losses, but thats besides the point..). Drag is worked out using the engine RPM, converted to wheel RPM and threrefore car speed. Wheel torque is multiplied by wheel radius, to find the foward force, the drag force is then subtracted from the foward force to find the net force the car experiences. This is then divided by the car mass to find the acceleration. The acceleration is then integrated using a continous linear systems integrator to find the speed and this is then added to the initial engine rpm (after the relevant conversions).

 

So my problem is that my program hits the 8500 rpm engine redline within what I can only assume is milliseconds. I've fiddled about with the input node parameters but I can't seem to get it to work. Although I know the model is pretty crude I dont think its THAT inaccurate. I have attached the VI, please excuse any bad practices I've used, its the first time I've used this programming language.Any help will be very, very appreciated.

 

Victor

 

N.B the default vehicle parameters are based on a porsche 911.

0 Kudos
Message 1 of 5
(2,281 Views)
Solution
Accepted by topic author VicMackie

I solved the problem by synchronizing my loop with to a timing source. I also made the period '1'.

Message 2 of 5
(2,220 Views)

Thats great, thanks for posting up your solution.

 

Looking at your previous code, a control loop iteration of 1 second does seem a bit long!

Nick
0 Kudos
Message 3 of 5
(2,205 Views)

I'm buildong a EV powertrain system simulation using labview simulation loop,considering the too much arithmetic operation it contained, 1 second is needed,it is not long..

0 Kudos
Message 4 of 5
(2,200 Views)

Yeah that was because I was new (still am relatively new :P) to Labview and I was trying to get simulation to run 1 second at a time. I've learnt about have ODEs work and I know generally a smaller time step gives you a more accurate solution. Making the time step 1 second seemed silly but it was all I could think of at the time.

 

Its one of those things were I assumed too much of the program. I assumed LabView would know what a second was but of course the only way LabView or indeed any other program would know what a second was is by schronizing with the system clock 🙂

0 Kudos
Message 5 of 5
(2,192 Views)