SYSTEM DYNAMICS: THE INTEGRATOR
Visualizing $1/s^n$ in Time & Frequency
The Theory of Integration ($1/s^n$)
In Control Systems, "Integration" is the act of accumulating the past. Mathematically, the Laplace transform of an integral is $1/s$. When you see $1/s^2$, you are looking at a system that integrates twice.
Time Domain Analysis
Input → Output:
- Type 1 ($1/s$): Constant → Ramp. Sine → Cosine (-90°).
- Type 2 ($1/s^2$): Constant → Parabola. Sine → -Sine (-180°).
Think of Type 2 as Physics: Force (Input) creates Acceleration, which is integrated to Velocity, then integrated again to Position.
Frequency Domain (Bode)
Magnitude Slope:
- Type 1: -20 dB/decade slope.
- Type 2: -40 dB/decade slope.
- Type 3: -60 dB/decade slope.
This is why higher-type systems are "Low Pass" by nature—they filter out high frequencies much more aggressively.
How this Simulator Works
- The Engine: The code uses Euler Integration. It takes the current input value, multiplies it by a small time step ($\Delta t$), and adds it to a "running total" buffer.
- Chain Integration: For $1/s^2$, it integrates the result of the first integrator. This mimics real-world analog circuits (Operational Amplifiers in series).
- The Logic: You'll notice that for a Square Wave, a Type 1 system produces a Triangle Wave. If you switch to Type 2, that Triangle Wave turns into "curved" Parabolic segments. This is the visual proof of $t \rightarrow t^2$.
Why Integrate? The Signal Processing Perspective
Noise Reduction
Integration acts as a Perfect Low-Pass Filter. Rapid jitter (high frequencies) cancels out, leaving only the meaningful "true" signal trends.
Memory (Control)
Integration tracks "Steady-State Error." It remembers how long you've been off-target and accumulates "push" until the error is zero.
Reconstruction
Sensors often measure "rates" (acceleration/current). Integration reconstructs the physical reality (position/battery charge) we actually care about.
Wave Shaping
It removes sharp harmonics. By "rounding corners," integration transforms harsh pulses into smooth, melodic waveforms (e.g., Square → Triangle).
| Domain | Operation | Core Benefit |
|---|---|---|
| Time | Accumulation | Replaces "flicker" with long-term stability. |
| Frequency | 1/Ļ Gain | Aggressively kills high-frequency noise. |
| Physics | $\int$ velocity | Calculates distance/result from an action. |