Model and numerical method
The drawings, graphs and numbers come from the same browser calculation. These equations and limits make the experiment reproducible.
DC motor
The preset uses R = 2 Ω, L = 0.12 H, Kₑ = Kₜ = 0.05, J = 0.002 kg·m² and b = 0.0005 N·m·s. Applied voltage is limited to ±12 V. The rotor angle integrates angular speed.
Cart-pole
The pole is modeled as a point mass m = 0.2 kg at length l = 0.3 m on a cart of mass M = 0.5 kg. Cart damping is b = 0.1 N·s/m. Force is limited to ±30 N. The simulation stops at ±2.4 m or a pole angle of ±90°.
Angle-only mode controls the pole near upright. Cascade mode adds a small desired angle based on cart position and velocity. This is a local balance experiment; it does not simulate swing-up.
Controller and time
A cart kick is an instantaneous impulse to cart velocity. A motor tap applies a finite torque pulse; the first-release `load` event remains a persistent step for older shared experiments. The controller updates every 20 ms. It filters the measured derivative and conditionally pauses integral accumulation when the error would drive the requested input further into saturation. Continuous plant states use fixed-step fourth-order Runge–Kutta with a 5 ms step. Playback speed changes only the display clock.
Reading the metrics
Motor rise time is the time between the first 10% and 90% target crossings. Overshoot is the peak above a positive target as a percentage of that target. Settling time is the first time after the last excursion beyond a ±2% target band. A run that never stays inside the band shows “Not settled”. Cart-pole balance uses angle and position traces rather than motor rise metrics.
The model is educational. Parameters, actuator limits and the upright operating region are documented so a result can be tested, not treated as a hardware controller.
모델과 계산 방법
모터와 역진자는 5 ms 간격의 RK4로 계산하고, 제어기는 20 ms마다 갱신합니다. 재생 속도는 화면 시간만 바꿉니다. 모터 전압은 ±12 V, 카트 힘은 ±30 N으로 제한합니다. 포화 중 anti-windup은 오차가 포화를 더 심하게 만드는 적분을 멈춥니다.
역진자 실험은 직립 근처의 균형만 다룹니다. 카트가 ±2.4 m에 닿거나 막대가 ±90°를 넘으면 실험이 종료됩니다. 실제 장치의 설계와 검증에 그대로 사용할 수 있는 모델은 아닙니다.