Closed Frankybeen29 closed 7 months ago
A driver has been added that gets the message of the recent velocity and turns it into a required powersignal over a P-regulator
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.
So that we just have to pull the block diagram into our myDriver and just attach the values we need.
The result of the created regulator can be seen in the picture below
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.
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.
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.
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
Also, the system test can be simplified by using a timer
Also, the system test can be simplified by using a timer
Done
Experiment video:
Why does the success LED turn off?
Alternatives Video:
Video is added and issue closed
Später sollen noch features hinzugefügt werden für die Begrenzung der Quergeschwindigkeit