powerhouse-rp-toolkit
Version:
Renaissance Periodization Training Toolkit for PowerHouseATX
198 lines (134 loc) โข 6.38 kB
Markdown
# โ
UPGRADE #3 COMPLETE: Enhanced Fatigue & MRV Detection
## ๐ฏ **IMPLEMENTATION STATUS: FULLY COMPLETE**
The Enhanced Fatigue & MRV Detection system has been successfully implemented, replacing the DOMS-only approach with a comprehensive **SFR (Stimulus-to-Fatigue Ratio) + Rep Strength Drop** detection system.
---
## ๐ง **IMPLEMENTED COMPONENTS**
### **1๏ธโฃ Enhanced Feedback Model** โ
- **Joint Ache Scale** (0-3): None โ Mild โ Moderate โ Pain
- **Performance Change** (+1 PR, 0 same, -1 drop): Tracks strength trends
- **Baseline Strength Tracking**: Captures week 1 top-set loads
- **Rep Strength Drop Detection**: Triggers at <97% of baseline
**Location**: `js/core/trainingState.js` - `setBaselineStrength()`, `repStrengthDrop()`
### **2๏ธโฃ SFR Algorithm** โ
```javascript
// Enhanced fatigue calculation
const fatigue = soreness + jointAche + (perfChange < 0 ? 2 : 0);
const stimulus = pump + disruption;
const SFR = stimulus / (fatigue || 1);
// High fatigue if SFR โค 1 OR strength drop detected
return SFR <= 1 || strengthDrop;
```
**Location**: `js/algorithms/fatigue.js` - `isHighFatigue()`
### **3๏ธโฃ Enhanced Deload Logic** โ
- **One Bad Week Rule**: Deload can fire after just **one** week where SFR โค 1 or rep-strength drops <-3%
- **Enhanced shouldDeload()**: Includes fatigue-based MRV detection
- **Console Logging**: Shows `hitMRV: true (fatigue)` when strength dips
**Location**: `js/core/trainingState.js` - `shouldDeload()`
### **4๏ธโฃ Volume Integration** โ
```javascript
// Check for high fatigue using enhanced detection
const high = isHighFatigue(muscle, feedback, state);
if (high) {
// Treat like MRV - trigger recovery
state.hitMRV(muscle);
mrvHits++;
console.log(`hitMRV: true (fatigue) - ${muscle}`);
// Force recovery session
feedback.recoverySession = true;
}
```
**Location**: `js/algorithms/volume.js` - `processWeeklyVolumeProgression()`
### **5๏ธโฃ UI Integration** โ
- **Joint Ache Slider** (0-3): Added to feedback form
- **Performance Change Dropdown**: PR/Same/Drop options
- **Feedback Collection**: Enhanced `collectFeedbackData()`
**Location**: `index.html` (lines 1301-1315), `js/ui/feedbackFormUI.js`
### **6๏ธโฃ Global Exposure** โ
- Functions exposed via `globals.js` for legacy compatibility
- Enhanced mock feedback generators include new fields
- Auto-progression demo includes fatigue simulation
**Location**: `js/ui/globals.js`
---
## ๐งช **TESTING FRAMEWORK**
### **Quick Test Suite**: `test-fatigue-quick.html`
- โ
**SFR โค 1 Trigger Test**: Verifies high fatigue detection when SFR drops below 1
- โ
**3% Strength Drop Test**: Verifies detection when load drops below 97% of baseline
- โ
**Early Deload Test**: Confirms deload can trigger after just one bad week
### **Comprehensive Test Suite**: `test-enhanced-fatigue.html`
- โ
**SFR Calculation Tests**: Various fatigue/stimulus combinations
- โ
**Strength Drop Detection**: Baseline comparison validation
- โ
**Integration Testing**: Complete system workflow
- โ
**4-Week Progression Demo**: Progressive fatigue buildup simulation
---
## ๐ **ALGORITHM EXAMPLES**
### **Scenario 1: High Fatigue (SFR โค 1)**
```
Input: soreness=3, jointAche=2, perfChange=-1, pump=1, disruption=1
Fatigue: 3 + 2 + 2 = 7 (performance penalty)
Stimulus: 1 + 1 = 2
SFR: 2/7 = 0.29 โค 1 โ ๐ด HIGH FATIGUE
Result: hitMRV(muscle), force recovery session
```
### **Scenario 2: Strength Drop**
```
Input: baseline=100kg, lastLoad=95kg
Drop: (100-95)/100 = 5% > 3% threshold โ ๐ด STRENGTH DROP
Result: hitMRV(muscle), force recovery session
```
### **Scenario 3: Normal Training**
```
Input: soreness=1, jointAche=0, perfChange=0, pump=3, disruption=3
Fatigue: 1 + 0 + 0 = 1
Stimulus: 3 + 3 = 6
SFR: 6/1 = 6.0 > 1 โ ๐ข NORMAL
Result: Continue progression
```
---
## ๐ฎ **HOW TO USE**
### **In Main Application:**
1. **Daily Planning** โ Submit Feedback Form
2. **Enhanced Fields Available:**
- Joint Ache Level (0-3 input)
- Performance Change (dropdown: PR/Same/Drop)
3. **System automatically detects high fatigue and triggers earlier deloads**
### **In Test Suite:**
1. Open `test-fatigue-quick.html` for quick verification
2. Open `test-enhanced-fatigue.html` for comprehensive testing
3. Run **Auto-Volume Progression** in main app to see console logs
---
## ๐ **UPGRADE BENEFITS**
### **Before (DOMS-only):**
- Manual deload decisions
- Often too late (2+ weeks of overreaching)
- Single-factor assessment (soreness only)
- No objective performance tracking
### **After (Enhanced Fatigue Detection):**
- โ
**Automated early detection** (1 week)
- โ
**Multi-factor assessment** (soreness + joint ache + performance + strength)
- โ
**Objective strength tracking** (rep-strength drop)
- โ
**Mathematical precision** (SFR calculation)
- โ
**Prevents overtraining** before it becomes problematic
---
## โ
**SUCCESS CRITERIA MET**
โ
**Deload can fire after ONE bad week** where SFR โค 1 or rep-strength drops <-3%
โ
**Console log shows** `hitMRV: true (fatigue)` when fatigue is detected
โ
**Manual DOMS-only check** is fully removed and replaced
โ
**Rep-strength-drop + joint-ache scale** implemented
โ
**SFR test** integrated into volume progression logic
---
## ๐ **INTEGRATION STATUS**
- โ
**Volume System**: Integrated with auto-progression
- โ
**RIR Schedule**: Works with weekly load adjustments
- โ
**Chart System**: Updates show recovery sessions
- โ
**Training State**: Tracks baseline and current performance
- โ
**UI/UX**: Seamless user experience with new inputs
---
## ๐ฏ **NEXT STEPS**
The Enhanced Fatigue & MRV Detection system is **production ready**. Users can now:
1. **Submit feedback** with the new Joint Ache and Performance Change fields
2. **Watch console logs** during auto-progression to see fatigue detection in action
3. **Experience earlier deloads** when the system detects high fatigue
4. **Use test suites** to verify system behavior and understand the algorithms
The system represents a significant advancement in automated training periodization, moving from simple DOMS-based assessment to sophisticated multi-factor fatigue detection with objective performance tracking.
---
**๐ฅ Enhanced Fatigue & MRV Detection - UPGRADE #3 COMPLETE**