[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #62186] Function 'bode' produces possibly corr
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #62186] Function 'bode' produces possibly correct but mis-presented result |
Date: |
Mon, 14 Mar 2022 23:01:49 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?62186>
Summary: Function 'bode' produces possibly correct but
mis-presented result
Project: GNU Octave
Submitted by: None
Submitted on: Tue 15 Mar 2022 03:01:47 AM UTC
Category: Octave Forge Package
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name: Chris
Originator Email: ccarter@tmt.org
Open/Closed: Open
Release: 6.4.0
Discussion Lock: Any
Operating System: Microsoft Windows
_______________________________________________________
Details:
For the second order state-space system below, function 'bode' produces an
incorrectly presented plot, i.e. the X-axis lower limit is much lower than
necessary and the lower bound of the plot is shown with no data points present
at lower frequencies. See attached image.
m = 1.0 % Mass
k = 10.0 % Spring constant
b = 1 % Damping constant
% State-space model of the mass-spring-damper system
A = [0 1;...
-k/m -b/m]
B = [0;...
-1/m]
C = [1 0;...
0 1;...
-k/m -b/m]
D = [0;
0;
-1/m]
states = {'Position' 'Velocity'}
inputs = {'Force'}
outputs = {'Position' 'Velocity' 'Acceleration'}
system = ss(A,B,C,D,'statename',states,...
'inputname', inputs,...
'outputname', outputs)
% Time-domain responses
% Impulse responses
figure()
impulse(system(1,1))
figure()
impulse(system(2,1))
% figure()
% impulse(system(3,1))
% Step responses
figure()
step(system(1,1))
figure()
step(system(2,1))
figure()
step(system(3,1))
% Pole-zero maps
figure()
pzmap(system(1,1))
% Bode plot
figure()
bode(system(1,1)); % Force to Position
title('Bode: Force to Position')
figure()
bode(system(2,1)); % Force to Velocity
title('Bode: Force to Velocity')
figure()
bode(system(3,1)); % Force to Acceleration
title('Bode: Force to Acceleration')
Matlab (version info below) is able to produce a properly scaled plot (see
attached image).
MATLAB Version: 9.11.0.1687835 (R2021b) Prerelease
MATLAB License Number: 865865
Operating System: Microsoft Windows 10 Pro Version 10.0 (Build 19044)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM)
64-Bit Server VM mixed mode
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tue 15 Mar 2022 03:01:47 AM UTC Name: Octave@Bode.PNG Size: 344KiB
By: None
<http://savannah.gnu.org/bugs/download.php?file_id=52988>
-------------------------------------------------------
Date: Tue 15 Mar 2022 03:01:47 AM UTC Name: Matlab@Bode.PNG Size: 124KiB
By: None
<http://savannah.gnu.org/bugs/download.php?file_id=52989>
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62186>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #62186] Function 'bode' produces possibly correct but mis-presented result,
anonymous <=