____ _____ ____ __ ___ __ ____ ____ ____ ____
/ ___)( _ )(_ _)( ) / __) ( ) ( __)(_ _)(_ _)(_ _)
\___ \ )(_)( _)(_ )(__ ( (__ )( ) _) )( )( _)(_
(____/(_____)(____)(____) \___) (__) (__) (__) (__) (____)
USCS & AASHTO Soil Classification β Powered by MATLAB/Simulink
An educational toolkit for civil engineers and students β classify soils in seconds, straight from Simulink.
π¦ Get Started Β· π Models Β· π§ͺ Example Β· π€ Contributing
This repository provides two plug-and-play Simulink models that classify soil samples using the two most widely used geotechnical standards:
| Model | Standard | Purpose |
|---|---|---|
| π¦ USCS | ASTM D2487 | Fine-grained soil classification (CH, CL, MH, MLβ¦) |
| π§ AASHTO | AASHTO M 145 | Highway subgrade suitability (A-1 through A-7-6) |
Both models accept the same three laboratory inputs and instantly output a standardized soil group symbol β no coding required.
Who is this for?
- π Civil engineering students learning soil mechanics
- ποΈ Geotechnical engineers wanting a fast sanity-check tool
- π§βπ« Instructors looking for visual, interactive teaching aids
Make sure you have the following installed:
- MATLAB R2023b+
- Simulink (included with most MATLAB licenses)
git clone https://github.com/Ahmad-Akram7/Simulink-Soil-Classification.git
cd Simulink-Soil-ClassificationNavigate to either model folder and open the .slx file:
USCS_Model/
βββ USCS_Soil_Model.slx β Open this in Simulink
AASHTO_Model/
βββ AASHTO_Soil_Model.slx β Or this one
On the left side of the model, locate the three Constant input blocks:
| Block Name | Description | Typical Range |
|---|---|---|
PercentPassing200 |
% of soil passing sieve #200 | 0 β 100 |
LiquidLimit |
Atterberg Liquid Limit (LL) | 20 β 100+ |
PlasticLimit |
Atterberg Plastic Limit (PL) | 10 β 60+ |
π‘ Tip: Double-click any
Constantblock to edit its value.
Click the βΆ Run button in the Simulink toolbar.
The Display block on the right shows your classification result immediately.
Standard: ASTM D2487 β Unified Soil Classification System
Classifies fine-grained soils using plasticity characteristics derived from Atterberg limits.
Possible Output Symbols:
| Symbol | Soil Type | Description |
|---|---|---|
CH |
High-plasticity Clay | Expansive, compressible β poor foundation material |
CL |
Low-plasticity Clay | Moderate plasticity, common subgrade soil |
MH |
High-plasticity Silt | Elastic, frost-susceptible |
ML |
Low-plasticity Silt | Low plasticity, frost-susceptible |
Decision Logic (simplified):
IF % Passing #200 β₯ 50 β Fine-Grained Soil
Plasticity Index (PI) = LL - PL
IF LL β₯ 50 β High Plasticity (H)
ELSE β Low Plasticity (L)
IF plots ABOVE A-line β Clay (C)
ELSE β Silt (M)
Standard: AASHTO M 145 β Classification of Soils and Soil-Aggregate Mixtures
Assesses soil suitability for use as road subgrade material in pavement construction.
Output Groups (A-Scale):
| Group | Description | Subgrade Quality |
|---|---|---|
A-1 |
Stone fragments, gravel, sand | βββ Excellent |
A-2 |
Silty or clayey gravel/sand | βββ Good |
A-3 |
Fine sand | ββ Good |
A-4 |
Silty soil | ββ Fair |
A-5 |
Silty soil (elastic) | β Poor |
A-6 |
Clayey soil | β Poor |
A-7-5 |
Clayey soil (elastic) | β Poor |
A-7-6 |
Clayey soil (expansive) | β Very Poor |
Here's a complete worked example using a high-plasticity clay sample:
Percent Passing #200 Sieve: 60%
Liquid Limit (LL): 55
Plastic Limit (PL): 28
Plasticity Index (PI): 27 # Computed: LL - PL|
π¦ USCS Output LL = 55 > 50 β High plasticity |
π§ AASHTO Output High fines + high LL + high PI |
β Both models correctly identify this as a high-plasticity clay β a soil type that engineers must treat carefully due to its shrink-swell behavior and low bearing capacity.
Simulink-Soil-Classification/
β
βββ π USCS_Model/
β βββ USCS_Soil_Model.slx # USCS Simulink model
β
βββ π AASHTO_Model/
β βββ AASHTO_Soil_Model.slx # AASHTO Simulink model
β
βββ π Report/
β βββ USCS MODEL.png # USCS model screenshot
β βββ AASHTO MODEL.png # AASHTO model screenshot
β
βββ LICENSE # MIT License
βββ README.md # This file
| Term | Definition |
|---|---|
| Sieve #200 | 0.075 mm opening β separates fine from coarse-grained soils |
| Liquid Limit (LL) | Water content at which soil transitions from plastic to liquid state |
| Plastic Limit (PL) | Water content below which soil behaves as a semi-solid |
| Plasticity Index (PI) | PI = LL β PL; measures the range of plastic behavior |
| A-line | Boundary on the Casagrande plasticity chart separating clays (C) from silts (M) |
| USCS | Unified Soil Classification System β general geotechnical use |
| AASHTO | American Association of State Highway and Transportation Officials standard |
Contributions are warmly welcomed! Here's how to get involved:
- Fork the repository
- Create a feature branch:
git checkout -b feature/coarse-grained-uscs - Commit your changes:
git commit -m 'Add coarse-grained soil classification' - Push to the branch:
git push origin feature/coarse-grained-uscs - Open a Pull Request
- Add coarse-grained USCS classification (GW, GP, SW, SPβ¦)
- Extend AASHTO to include Group Index (GI) calculation
- Add a MATLAB Live Script companion for step-by-step walkthroughs
- Create a standalone App Designer GUI for non-Simulink users
- Add input validation blocks for out-of-range values
Please open an issue first for major changes so we can discuss the approach.
This project is released under the MIT License β free to use, modify, and distribute.
See the LICENSE file for full details.
Built for engineers, by engineers.
If this saved you time, consider β starring the repo!
Made with β and a deep appreciation for geotechnical engineering

