IamCyBo / Graphical_Programming_CurveDriving

The Unlicense
0 stars 0 forks source link

R1 - The Route shall be driven most the time with some 60 km/h accelerating from 0 km/h at the start point at x = y = 0 #1

Closed Frankybeen29 closed 7 months ago

Frankybeen29 commented 8 months ago

Später sollen noch features hinzugefügt werden für die Begrenzung der Quergeschwindigkeit

Frankybeen29 commented 7 months ago

Setup

A driver has been added that gets the message of the recent velocity and turns it into a required powersignal over a P-regulator

image

To easily create testdrivers for specific speeds and to test the testcases the functionality in myDriver is outsourced to in the components folder into the driverTemplate file.

image

So that we just have to pull the block diagram into our myDriver and just attach the values we need.

image

Results

The result of the created regulator can be seen in the picture below

image

The car reaches the speed of 60 km/h in about 4s and keeps the pace. The resulting speed is not exactly 60 km/h but the difference is only 0.007 km/h and thats round about 0,0117% deviation, which is under the 1-2% that were suggested.

Evolution

The problem was that the regulator not only needs to manage the throttle of the car but also the braking force. Therefore it has to be remastered with two return values. One return value returns the amount of power that is needed to accelerate and the other returns the brakeforce if needed. There are also two limiters used to limit each of those two parameters in an interval between 0 to 100.

image

We also discovered how to use timers so that we dont have to use stopwatches and tables for the tests to run as seen in the picture below.

image

Frankybeen29 commented 7 months ago

Tests

A testcase has been created that checks if the velocity drops or rises over 1% of the demanded velocity. At the beginning there is a 4s window for the car to accelerate

image

MoxCodes22 commented 7 months ago

Also, the system test can be simplified by using a timer

Frankybeen29 commented 7 months ago

Also, the system test can be simplified by using a timer

Done

MoxCodes22 commented 7 months ago
Frankybeen29 commented 7 months ago

Experiment video:

2024-04-03_12h03_16

MoxCodes22 commented 7 months ago

Why does the success LED turn off?

MoxCodes22 commented 7 months ago

Alternatives Video: 2024-04-03_17h14_53

Frankybeen29 commented 7 months ago

Video is added and issue closed