Clear Filters
Clear Filters

Control vehicles velocity according to speed signs

3 views (last 30 days)
I want to make a controller that takes value from traffic speed sign and control vehicles velocity according to speed signs. Requirements: vehicle run on pre defined maneuver speed until it detects speed sign on road. As soon as it detects speed sign, vehicle velocity should change to that value and continue until next sign detected.
How can I model? Please help me to get some idea. i am stuck at a point where traffic speed signs are out of the range of sensor. At that time vehicle velocity is going down instead of remain constant.

Answers (1)

Sam Chak
Sam Chak on 23 Apr 2023
@Purvil Patel, Here is th basic idea.
Even though some speed limit signs maybe out of the sensor's range, the controller should be able to hold on the last detected speed limit.
Gp = tf(1, [1 1]);
t = linspace(0, 40, 4001);
u1 = 5*heaviside(t);
u2 = 2*heaviside(t - 10);
u3 = 1*heaviside(t - 20);
u4 = 2*heaviside(t - 30);
u = u1 - u2 + u3 - u4;
lsim(Gp, u, t)
grid on, ylim([0 6])

Categories

Find more on Simulink in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!