Skip to content

Commit 6b4501e

Browse files
committed
fix unintended use of complex coefficient in examples/cruise.ipynb
1 parent d9affba commit 6b4501e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/cruise.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,8 @@
420420
"name": "stdout",
421421
"output_type": "stream",
422422
"text": [
423-
"system: a = (0.010124405669387215-0j) , b = (1.3203061238159202+0j)\n",
424-
"pzcancel: kp = 0.5 , ki = (0.005062202834693608+0j) , 1/(kp b) = (1.5148002148317266+0j)\n",
423+
"system: a = 0.010124405669387215 , b = 1.3203061238159202\n",
424+
"pzcancel: kp = 0.5 , ki = 0.005062202834693608 , 1/(kp b) = 1.5148002148317266\n",
425425
"sfb_int: K = 0.5 , ki = 0.1\n"
426426
]
427427
},
@@ -442,7 +442,7 @@
442442
"\n",
443443
"# Construction a controller that cancels the pole\n",
444444
"kp = 0.5\n",
445-
"a = -P.poles()[0]\n",
445+
"a = -P.poles()[0].real\n",
446446
"b = np.real(P(0)) * a\n",
447447
"ki = a * kp\n",
448448
"control_pz = ct.TransferFunction(\n",

0 commit comments

Comments
 (0)