help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Control System Design methods using Octave.


From: Doug Stewart
Subject: Re: Control System Design methods using Octave.
Date: Wed, 6 Dec 2017 19:06:19 -0500



On Wed, Dec 6, 2017 at 6:30 PM, shall689 <address@hidden> wrote:
I updated my code to use the 1/SampleFrequency in the tf() function.  It
seems to give me much better results.

The code in my last post had n am m values for invfreqz() that were not
related to my previous post.  I had been playing around with those values to
see if I could get a bode plot that was closer to the bode plot generated
from the PSIM simulation frequency sweep.   The code below uses the n and m
values I had in my original code.  How do I decide the n and m value --- by
trial and error?

I don't see how you are using n and m in this code?
Doug


 



 

pkg load control;
pkg load signal;
clear all
x = csvread('buckVfreqResp.csv');
SampleFrequency = 20000;
T = 1/SampleFrequency;
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*T);
[b,a] = invfreqz(h,w,2,3)
sys = tf(b,a)
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



--
DASCertificate for 206392


reply via email to

[Prev in Thread] Current Thread [Next in Thread]