|
From: | anonymous |
Subject: | [Octave-bug-tracker] [bug #61061] [octave forge] (control) margin() and step() giving wrong results |
Date: | Thu, 19 Aug 2021 09:33:06 -0400 (EDT) |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36 |
URL: <https://savannah.gnu.org/bugs/?61061> Summary: [octave forge] (control) margin() and step() giving wrong results Project: GNU Octave Submitted by: None Submitted on: Thu 19 Aug 2021 01:33:04 PM UTC Category: Octave Forge Package Severity: 3 - Normal Priority: 5 - Normal Item Group: Incorrect Result Status: None Assigned to: None Originator Name: Originator Email: Open/Closed: Open Release: 5.2.0 Discussion Lock: Any Operating System: GNU/Linux _______________________________________________________ Details: I am using the package “control” provided by Octave Forge to investigate the performance of a PLL transfer function. The transfer function is derived from loop filter components R1 to R4 and C1 to C4. For lower order PLL transfer functions, some components e.g. R3/R4 and C3/C4 are not used - this means I can either set them to “0” or to “eps” (the smallest possible value). I prefer to set them to “eps” to avoid any division by zero in future calculations. The resulting transfer function with components set to “eps” looks like: pll0.TF_cl_fbdiv_out Transfer function ‘ans’ from input ‘u1’ to output … 6.027e-84 s^6 + 3.668e-52 s^5 + 2.48e-21 s^4 + 9.427e-14 s^3 + 1.085e-07 s^2 y1: ----------------------------------------------------------------------------------------------------------------------------------------------- 7.384e-161 s^10 + 8.987e-129 s^9 + 3.342e-97 s^8 + 3.697e-66 s^7 + 1.25e-35 s^6 + 9.206e-28 s^5 + 1.943e-20 s^4 + 9.427e-14 s^3 + 1.085e-07 s^2 The functions margin(pll0.TF_cl_fbdiv_out) gets me wrong numbers and the step(pll0.TF_cl_fbdiv_out) function also does not shows any reasonable transient results. But when setting the unused components to “0”, the transfer function results in: >>pll0.TF_cl_fbdiv_out Transfer function ‘ans’ from input ‘u1’ to output … 2.479e-21 s^4 + 9.427e-14 s^3 + 1.085e-07 s^2 y1: ---------------------------------------------------------------------------- 1.25e-35 s^6 + 9.205e-28 s^5 + 1.943e-20 s^4 + 9.427e-14 s^3 + 1.085e-07 s^2 And the margin(pll0.TF_cl_fbdiv_out) gets me the expected numbers (PM=135deg@4.21rad/s) and the step(pll0.TF_cl_fbdiv_out) function also shows reasonable transient results. Questions: Is this a bug in the control package that it cannot handle those small values (e.g. 8.9e-129) in the “eps” transfer function ? Is there a way to “cleanup” the transfer function parameter values to avoid such wrong results ? Why can the margin() and step() functions not properly handle the transfer function ? _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?61061> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |