-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes to Sherlock benchmark specifications (safety box in Tora and sh…
…ifting and scaling in Tora and Unicycle)
- Loading branch information
Showing
3 changed files
with
37 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
function [dx] = dynamics10(t,x,u,w) | ||
% Ex_car_model | ||
%vehicleODE Bicycle model of a vehicle with | ||
% states | ||
% x(1), x(2): x,y positions | ||
% x(3): Yaw angle (\psi) | ||
% x(4): velocity | ||
% control inputs | ||
% u(1): acceleration m/s^2 | ||
% u(2): steering angle of front wheel | ||
% disturbance input | ||
% w: disturbance with a range (-10^-4,10^4) | ||
% Initial state range [9.5, 9.55] × [-4.5, -4.45] × [2.1, 2.11] × [1.5, 1.51] | ||
|
||
dx(1,1) = x(4) * cos(x(3)); | ||
dx(2,1) = x(4) * sin(x(3)); | ||
dx(3,1) = u(2); | ||
dx(4,1) = u(1) + w; | ||
|
||
function [dx] = dynamics10(t,x,u,w) | ||
% Ex_car_model | ||
%vehicleODE Bicycle model of a vehicle with | ||
% states | ||
% x(1), x(2): x,y positions | ||
% x(3): Yaw angle (\psi) | ||
% x(4): velocity | ||
% control inputs | ||
% u(1): acceleration m/s^2 | ||
% u(2): steering angle of front wheel | ||
% disturbance input | ||
% w: disturbance with a range (-10^-4,10^4) | ||
% Initial state range [9.5, 9.55] × [-4.5, -4.45] × [2.1, 2.11] × [1.5, 1.51] | ||
% | ||
% The output of the neural network f(x) needs to be normalized | ||
% in order to obtain u(1) and u(2). | ||
% Namely, u(i) = f(x)(i) - 20 | ||
% | ||
dx(1,1) = x(4) * cos(x(3)); | ||
dx(2,1) = x(4) * sin(x(3)); | ||
dx(3,1) = u(2); | ||
dx(4,1) = u(1) + w; | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
function [dx] = dynamics9(t,x,u) | ||
% Ex_tora | ||
% Initial state range: | ||
function [dx] = dynamics9(t,x,u) | ||
% Ex_tora | ||
% Initial state range: | ||
% [0.6, 0.7] × [-0.7, -0.6] × [-0.4, -0.3] × [0.5, 0.6] | ||
|
||
dx(1,1) = x(2); | ||
dx(2,1) = - x(1) + 0.1*sin(x(3)); | ||
dx(3,1) = x(4); | ||
dx(4,1) = u; | ||
|
||
% | ||
% The output of the neural network f(x) needs to be normalized | ||
% in order to obtain u. | ||
% Namely, u = f(x) - 10 | ||
% | ||
dx(1,1) = x(2); | ||
dx(2,1) = - x(1) + 0.1*sin(x(3)); | ||
dx(3,1) = x(4); | ||
dx(4,1) = u; | ||
|
||
end |