|
From: | Doug Stewart |
Subject: | Re: Control System Design methods using Octave. |
Date: | Thu, 7 Dec 2017 15:16:47 -0500 |
Doug Stewart-4 wrote
> On Wed, Dec 6, 2017 at 4:57 PM, shall689 <
> sahallacy@
> > wrote:
>
>> Ok, I removed SampleFrequency from the tf function, i.e. tf(b,a) instead
>> of
>> tf(b,a,SampleFrequency).
>>
>> The bode plot seem to match each other much better and the frequency
>> range
>> is a little better, with the only issue is that the max discrete
>> frequency
>> is 10 (>> pi).
>>
>> Is there some type of issue with the bode() function?
>>
>>
>> <http://octave.1599824.n4.nabble.com/file/t372348/ >BodePlot2.png
>>
>>
>>
>> --
>> Sent from: http://octave.1599824.n4.nabble.com/Octave-General-
>> f1599825.html
>>
>>
> Hi Shall
> If you would post your exact code, for me to run, then I am sure that I
> can
> answer your questions.
> https://pastebin.com/ is one way to post it.
>
>
>
> --
> DAS
>
> <https://linuxcounter.net/user/206392.html >
>
> _______________________________________________ The a and b were reversed in the tf() function. I corrected that issue (see
> Help-octave mailing list
> Help-octave@
> https://lists.gnu.org/mailman/listinfo/help-octave
below). Now, there is even a greater difference between the simulator's
frequency response data and the transfer function returned by invfreqz().
Stephen
pkg load control;
pkg load signal;
clear all
close all
clc
x = csvread('buckVfreqResp.csv');
SampleFrequency = 20000;
f = x(:,1);
r = x(:,2);
phase_rad = x(:,3).*(pi/180);
h = r.*cos(phase_rad) + r.*(sin(phase_rad)*i);
w = f.*2*pi/SampleFrequency;
[b,a] = invfreqz(h,w,2,2)
sys = tf(a,b,1/SampleFrequency)
bode(sys);
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General- f1599825.html
_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave
[Prev in Thread] | Current Thread | [Next in Thread] |