From 43da7ff9e64f9b1d229c47b767e7cacfb35c6d0f Mon Sep 17 00:00:00 2001 From: Mitchell Fogelson Date: Tue, 26 Jul 2022 12:54:14 -0400 Subject: [PATCH] Updated the gain and simulation time The P gain and the simulation time needed to be increased to match the desired performance. NOTE: ``` storage = simulate!(mechanism, 20.0, controller!, record=true, verbose=true); ``` This outputs NAN values for mu --- docs/src/define_controller.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/define_controller.md b/docs/src/define_controller.md index f8fc36239..554df8830 100644 --- a/docs/src/define_controller.md +++ b/docs/src/define_controller.md @@ -33,7 +33,7 @@ function controller!(mechanism, t) x = get_minimal_state(mechanism) ## Gains - K = [5.0 0.5] * 0.1 + K = [75.0 0.5] * 0.1 # Control inputs u = -K * (x - x_goal) @@ -50,7 +50,7 @@ initialize!(mechanism, :pendulum, We simulate the system for 2 seconds using the `controller!`. ```julia -storage = simulate!(mechanism, 2.0, controller!, +storage = simulate!(mechanism, 20.0, controller!, record=true, verbose=true); ```