-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContents.m
More file actions
100 lines (100 loc) · 6.67 KB
/
Contents.m
File metadata and controls
100 lines (100 loc) · 6.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
% OpenSMC - Modular Sliding Mode Control Toolbox
% Version 2.0.0 (2026-03-17)
%
% A modular, open-source MATLAB toolbox for sliding mode control (SMC)
% design, simulation, and benchmarking. Provides 56 interchangeable
% components across 9 packages, enabling fair comparison of SMC variants
% on standardized plant models.
%
% Core Interfaces (abstract base classes)
% core.SlidingSurface - Abstract base class for sliding surface designs
% core.ReachingLaw - Abstract base class for reaching law designs
% core.Plant - Abstract base class for dynamical system models
% core.Controller - Abstract base class for SMC controllers
% core.Estimator - Abstract base class for disturbance/uncertainty estimators
% core.Architecture - Abstract base class for control architectures
%
% Sliding Surfaces
% surfaces.LinearSurface - Linear surface s = edot + c*e (asymptotic convergence)
% surfaces.TerminalSurface - Terminal surface s = edot + beta*|e|^(p/q)*sign(e) (finite-time, singular)
% surfaces.NonsingularTerminalSurface - Nonsingular terminal surface s = e + (1/beta)*|edot|^(q/p)*sign(edot)
% surfaces.FastTerminalSurface - Fast terminal surface s = edot + alpha*e + beta*|e|^(q/p)*sign(e) (global finite-time)
% surfaces.IntegralSlidingSurface - Integral sliding surface s = C*(e - E), eliminates reaching phase
% surfaces.HierarchicalSurface - Hierarchical surface S = s1 + lambda*s2 for underactuated systems
% surfaces.PIDSurface - PID-type surface s = alpha*edot + beta*e + gamma*integral(e)
% surfaces.PredefinedTimeSurface - Time-varying surface with guaranteed convergence before user-specified Tc
% surfaces.NonlinearDampingSurface - Variable-damping surface s = edot + (c + Psi(y))*e (Bandyopadhyay)
% surfaces.GlobalSurface - Global surface s(0) = 0 via exponential decay of initial offset
% surfaces.IntegralTerminalSurface - Integral terminal surface s = edot + c1*e + c2*integral(|e|^(p/q)*sign(e))
%
% Reaching Laws
% reaching.ConstantRate - Classic sign-based reaching law u_r = -k*sign(s)
% reaching.ExponentialRate - Exponential reaching law u_r = -k*sign(s) - q*s (Gao & Hung 1993)
% reaching.PowerRate - Power-rate reaching law u_r = -k*|s|^alpha*sign(s)
% reaching.SuperTwisting - Super-twisting algorithm, continuous chattering-free 2nd-order SMC (Levant 1993)
% reaching.Saturation - Boundary layer reaching law u_r = -k*sat(s/phi)
%
% Controllers
% controllers.ClassicalSMC - Standard SMC: u = u_eq + u_reaching (any surface + reaching law)
% controllers.AdaptiveSMC - Adaptive SMC with Lyapunov-based online gain tuning
% controllers.DynamicSMC - Dynamic SMC: discontinuity on u_dot for continuous control output
% controllers.AggregatedHSMC - Aggregated hierarchical SMC for underactuated cranes (Qian & Yi)
% controllers.IncrementalHSMC - Incremental three-layer hierarchical SMC with sign-switching (Qian & Yi)
% controllers.CombiningHSMC - Combining hierarchical SMC with intermediate variable z = e1 + c*e3
% controllers.ITSMC - Integral terminal SMC with RBF-ELM disturbance compensation
% controllers.NFTSMC - Nonsingular fast terminal SMC with combined linear+terminal reaching
% controllers.FuzzySMC - Fuzzy SMC: Mamdani inference replaces sign(s) for chattering elimination
% controllers.DiscreteSMC - Discrete-time SMC with Gao's discrete reaching law (sampled-data)
% controllers.FixedTimeSMC - Fixed-time SMC with bi-power reaching law (Polyakov 2012)
%
% Plant Models
% plants.DoubleIntegrator - Double integrator x_ddot = u + d (canonical SMC benchmark)
% plants.InvertedPendulum - Cart-pole system, 4 states, underactuated (1 input, 2 DOF)
% plants.SinglePendulumCrane - Single-pendulum overhead crane, trolley + payload swing
% plants.DoublePendulumCrane - Double-pendulum overhead crane, trolley + hook + payload
% plants.Quadrotor6DOF - 6-DOF quadrotor, 12 states, Newton-Euler formulation
% plants.DualStageNanopositioner - Piezoelectric two-mode nanopositioner for precision positioning
% plants.TwoLinkArm - 2-DOF planar robot arm, Euler-Lagrange formulation, fully actuated
% plants.PMSM - Permanent magnet synchronous motor in dq-frame, 4 states
% plants.SurfaceVessel - 3-DOF marine surface vessel (surge, sway, yaw), Fossen model
%
% Disturbance/Uncertainty Estimators
% estimators.NoEstimator - Dummy estimator returning zero (pure SMC, no compensation)
% estimators.DisturbanceObserver - Slow time-varying disturbance observer for 2nd-order systems
% estimators.ExtendedStateObserver - Third-order ESO for lumped uncertainty estimation (ADRC)
% estimators.HighGainObserver - Second-order high-gain observer for unmeasured state estimation
% estimators.IntegralChainDifferentiator - High-order integral-chain differentiator for state and uncertainty
% estimators.RBF_ELM - RBF-ELM neural network with online OS-ELM weight adaptation
% estimators.LevantDifferentiator - Arbitrary-order robust exact differentiator via HOSM (Levant 2003)
%
% Control Architectures
% architectures.DirectSMC - Single-loop architecture for fully actuated systems
% architectures.CascadedSMC - Two-loop cascade: outer position SMC + inner attitude PD (quadrotors)
%
% Benchmark and Simulation
% benchmark.Simulator - Unified RK4/Euler simulation engine for closed-loop SMC experiments
% benchmark.BenchmarkRunner - Combinatorial runner for all architecture x plant configurations
% benchmark.Metrics - Standardized performance metrics (RMSE, ISE, settling time, chattering)
%
% Utility Functions
% utils.references - Standard reference trajectory generators (step, ramp, sinusoidal, waypoint)
% utils.disturbances - Standard disturbance profiles for benchmarking (step, sinusoidal, composite)
%
% Getting Started
% Run 'examples/example_01_classical_smc.m' for a minimal working example.
% See README.md for full documentation and tutorials.
%
% References
% Liu, J. & Wang, X. (2012). Advanced Sliding Mode Control. Springer.
% Qian, D. & Yi, J. (2015). Hierarchical Sliding Mode Control. Springer.
% Bandyopadhyay, B. et al. (2009). Sliding Mode Control Using Novel
% Sliding Surfaces. Springer LNCIS 392.
% Levant, A. (1993). Sliding order and sliding accuracy. IJOC.
% Polyakov, A. (2012). Fixed-time stabilization. IEEE TAC.
% Gao, W. & Hung, J.C. (1993). Variable structure control. IEEE TIE.
%
% Authors
% Ali Al Ghanimi, University of Kufa
%
% License
% MIT License. See LICENSE file for details.