Skip to content

Commit

Permalink
fixes to Sherlock benchmark specifications (safety box in Tora and sh…
Browse files Browse the repository at this point in the history
…ifting and scaling in Tora and Unicycle)
  • Loading branch information
ebotoeva committed Jul 7, 2020
1 parent 5edbcf3 commit bf2d49d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 29 deletions.
42 changes: 23 additions & 19 deletions benchmarks/Benchmark10-Unicycle/dynamics10.m
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
2 changes: 1 addition & 1 deletion benchmarks/Benchmark9-Tora/Specifications.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ control period = 1s

Property:

The system, states 1 to 3, always stays within the box x ∈ [-1,1]
The system states always stays within the box x ∈ [-2,2]


22 changes: 13 additions & 9 deletions benchmarks/Benchmark9-Tora/dynamics9.m
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

0 comments on commit bf2d49d

Please sign in to comment.