-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regularization error in ReachContinuous #45
Comments
Enhancement: a test problem by Yuchen Zhou is added to the regression test pack. Test problem itself is now calculated if a) regTol is increased up to 1e-5 b) directions [1 0 0 0 0 0 0] and [0 0 1 0 0 0 0 0] are removed from the list of good directions (dirsMat). Looks like the structure of A is such that l(t) degrades for these initial directions. There still a minor difference between this test and a real problem which will be eliminated in the next commit. Also we still need to add a few unit tests. Once all this is done the branch will be merged into master
Enhancement: a test problem by Yuchen Zhou is added to the regression test pack. Test problem itself is now calculated if a) regTol is increased up to 1e-5 b) directions [1 0 0 0 0 0 0] and [0 0 1 0 0 0 0 0] are removed from the list of good directions (dirsMat). Looks like the structure of A is such that l(t) degrades for these initial directions. There still a minor difference between this test and a real problem which will be eliminated in the next commit. Also we still need to add a few unit tests. Once all this is done the branch will be merged into master
Looks like commit 55b4c1e is already good to test my setup. Thanks for fixing it so fast. Happy Holidays, |
Enhancement: implemented a new test for l(t) degradation check Enhancement: fixed description of fields for all EllTube-like classes. Also fixed description for some of EllTube (and alike) methods. Enhancement: EllTube.fromEllArray method now accepts cell vectors of ellipsoid vectors and can construct multiple ellipsoidal tubes, not just one BugFix: calcPrecision is split into absTol and relTol in all the classes for ellipsoidal approximation and tests for them Enhancement: a test problem yuchenZhouProb1.xml by Yuchen Zhou is added to the regression test pack. Test problem itself is now calculated if a) regTol is increased up to 1e-5 b) directions [1 0 0 0 0 0 0] and [0 0 1 0 0 0 0 0] are removed from the list of good directions (dirsMat). Looks like the structure of A is such that l(t) degrades for these initial directions. There still a minor difference between this test and a real problem which will be eliminated in the nearest future. For now regression and support function-comparision tests for yuchenZhouProb1 do not pass (because of the mentioned difference in behavior) and temporarily switched off. Enhancement: a few cosmetic changes along the way
Looks like still having issue on the precision. I used the latest commit on master to test. The problem itself is modified according to a154e3b Error is following. check [any touch line is always within any external approx] has failed for xTouchCurveMat, expected precision=2.000000e-05, actual |
This might be caused by using a different CPU. This happened before when some tests pass on older CPUs and fail on newer CPUs because of different CPU instructions being used. However even on my CPU the same example integrated into the test coverage fails in the branch gras.ellapx.uncertcalc.test.regr.run_comp_tests('filter',{'yuchenZhouProb1','.','.'}) produced the same error as you reported. I plan to figure out why this happens and fix this within a few next weeks when I have time. Meanwhile I suggest you use a simple workaround by replacing throwerror with throwwarn on line 445 And of course you can participate in improving the solver or finding the bugs by figuring our why gras.ellapx.uncertcalc.test.regr.run_comp_tests('filter',{'yuchenZhouProb1','.','.'}) fails on your own if you do not want to wait for my fix and replacing exceptions with warnings doesn't work for you for some reason. |
Were you able to calculate the dynamics by replacing throwerror with throwwarn? Also, can you please, if possible, provide more details about the problem that leads to this specific linear control system? Maybe you have some paper? Right now I can use any interesting example of real problem that can be solved with help of the toolbox, especially for enhancing a list of demo examples. Thanks. |
Yes I am able to calculate the dynamics. There are still some precision issue so I am using another more stable dynamics instead. The linearization comes from http://uavbook.byu.edu/doku.php?id=lecture lecture 5. It includes a linearized model of the lateral motion of a fix-wing aircraft. The main issue is that the external approximation sometimes becomes way too far from the theoretically support function boundary derived from Prof. AB Kurzhanskiy's book. For a good example of using the toolbox, you can refer to the paper I published in CDC 2015 using this toolbox. It is in the archive http://arxiv.org/abs/1512.01195. I was using a linearized quadrotor dynamics. |
So do you do your research at Cornell University? If - can you please tell me a name of the department just for the record. I hope I could compile a list of places where the toolbox is used to increase its popularity. Thanks a lot. |
I have been trying reachablility set computation for some aircraft dynamics. I kept on getting strange errors in the regularization process. The code is attached test.txt
The errors when runing "rsObj_A = elltool.reach.ReachContinuous(lsys, x0EllObj, dirsMat, timeVec, 'isRegEnabled', true, 'isJustCheck', false, 'regTol', 1e-7);" are the following.
"
Error using modgen.common.checkvar (line 69)
matrix must be symmetric.
Error in gras.la.regposdefmat (line 20)
modgen.common.checkvar(inpMat, 'gras.la.ismatsymm(x)',...
Error in gras.mat.MatrixPosReg>@(x)gras.la.regposdefmat(x,self.regTol) (line 28)
@(x) gras.la.regposdefmat(x, self.regTol), resArray,...
Error in gras.gen.MatVector.evalMFunc (line 68)
resArray(:,:,iElem)=fHandle(dataArray(:,:,iElem));
Error in gras.mat.MatrixPosReg/evaluate (line 27)
resArray = gras.gen.SquareMatVector.evalMFunc(...
Error in gras.ellapx.lreachplain.ExtEllApxBuilder/calcEllApxMatrixDeriv (line 12)
BPBTransMat=BPBTransDynamics.evaluate(t);
Error in
gras.ellapx.lreachplain.ExtEllApxBuilder/getEllApxMatrixDerivFunc/@(t,y)calcEllApxMatrixDeriv(self,self.getProblemDef().getAtDynamics,self.getProblemDef.getBPBTransDynamics,self.getGoodDirSet.getRGoodDirOneCurveSpline(iGoodDir),t,y)
Error in gras.ode.MatrixODESolver>@(t,y)(reshape(fDerivFunc(t,reshape(y,reshapeSizeVec)),[],1)) (line 30)
fMatrixDerivFunc=@(t, y)(reshape(fDerivFunc(t, ...
Error in odearguments (line 87)
f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.
Error in ode45 (line 113)
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
Error in gras.ode.MatrixODESolver/solve (line 32)
[timeVec, xResMat] = ...
Error in gras.ellapx.lreachplain.ATightEllApxBuilder/build (line 54)
[~,data_Q_star]=solverObj.solve(fHandle,...
Error in gras.ellapx.lreachplain.ATightEllApxBuilder/getEllTubes (line 110)
self.build();
Error in gras.ellapx.gen.EllApxCollectionBuilder/getEllTubes (line 43)
ellTubeTempRel=self.builderList{iBuilder}.getEllTubes();
Error in elltool.reach.ReachContinuous/auxMakeEllTubeRel (line 136)
extEllTubeRel = extellTubeBuilder.getEllTubes();
Error in elltool.reach.ReachContinuous/internalMakeEllTubeRel (line 168)
[ellTubeRel,goodDirSetObj] = self.auxMakeEllTubeRel(...
Error in elltool.reach.AReach/makeEllTubeRel (line 657)
[ellTubeRel, goodDirSetObj] = self.internalMakeEllTubeRel(...
Error in elltool.reach.AReach (line 767)
[self.ellTubeRel,goodDirSetObj,probDynObj] =...
Error in elltool.reach.ReachContinuous (line 298)
self=[email protected](varargin{:});
Software Version:
ET Version 2.1
CVX and MPT is the ones included in the toolbox
MATLAB Version: 8.5.0.197613 (R2015a)
Operating System: Microsoft Windows 7 Enterprise Version 6.1 (Build 7601: Service Pack 1)
Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
MATLAB Version 8.5 (R2015a)
Simulink Version 8.5 (R2015a)
Bioinformatics Toolbox Version 4.5.1 (R2015a)
Communications System Toolbox Version 6.0 (R2015a)
Computer Vision System Toolbox Version 6.2 (R2015a)
Control System Toolbox Version 9.9 (R2015a)
Curve Fitting Toolbox Version 3.5.1 (R2015a)
DSP System Toolbox Version 9.0 (R2015a)
Data Acquisition Toolbox Version 3.7 (R2015a)
Database Toolbox Version 5.2.1 (R2015a)
Datafeed Toolbox Version 5.1 (R2015a)
Fixed-Point Designer Version 5.0 (R2015a)
Fuzzy Logic Toolbox Version 2.2.21 (R2015a)
Global Optimization Toolbox Version 3.3.1 (R2015a)
Image Acquisition Toolbox Version 4.9 (R2015a)
Image Processing Toolbox Version 9.2 (R2015a)
Instrument Control Toolbox Version 3.7 (R2015a)
MATLAB Coder Version 2.8 (R2015a)
MATLAB Compiler Version 6.0 (R2015a)
MATLAB Compiler SDK Version 6.0 (R2015a)
MATLAB Report Generator Version 4.1 (R2015a)
Mapping Toolbox Version 4.1 (R2015a)
Model Predictive Control Toolbox Version 5.0.1 (R2015a)
Multi-Parametric Toolbox Version 3.1 (R2011a)
Neural Network Toolbox Version 8.3 (R2015a)
OPC Toolbox Version 3.3.3 (R2015a)
Optimization Toolbox Version 7.2 (R2015a)
Parallel Computing Toolbox Version 6.6 (R2015a)
Partial Differential Equation Toolbox Version 2.0 (R2015a)
Robust Control Toolbox Version 5.3 (R2015a)
Signal Processing Toolbox Version 7.0 (R2015a)
SimEvents Version 4.4 (R2015a)
SimMechanics Version 4.6 (R2015a)
Simscape Version 3.13 (R2015a)
Simulink 3D Animation Version 7.3 (R2015a)
Simulink Coder Version 8.8 (R2015a)
Simulink Control Design Version 4.2 (R2015a)
Simulink Design Optimization Version 2.7 (R2015a)
Spreadsheet Link EX Version 3.2.3 (R2015a)
Stateflow Version 8.5 (R2015a)
Statistics and Machine Learning Toolbox Version 10.0 (R2015a)
Symbolic Math Toolbox Version 6.2 (R2015a)
System Identification Toolbox Version 9.2 (R2015a)
Wavelet Toolbox Version 4.14.1 (R2015a)
The text was updated successfully, but these errors were encountered: