|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 <
> > wrote:
>> Ok, I removed SampleFrequency from the tf function, i.e. tf(b,a) instead
>> The bode plot seem to match each other much better and the frequency
>> is a little better, with the only issue is that the max discrete
>> is 10 (>> pi).
>> Is there some type of issue with the bode() function?
>> Sent from: http://octave.1599824.n4.
> Hi Shall
> If you would post your exact code, for me to run, then I am sure that I
> answer your questions.
> https://pastebin.com/ is one way to post it.
_________________The a and b were reversed in the tf() function. I corrected that issue (see
> Help-octave mailing list
below). Now, there is even a greater difference between the simulator's
frequency response data and the transfer function returned by invfreqz().
pkg load control;
pkg load signal;
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)
Sent from: http://octave.1599824.n4.
Help-octave mailing list
|[Prev in Thread]||Current Thread||[Next in Thread]|