[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Control System Design methods using Octave.
From: |
shall689 |
Subject: |
Re: Control System Design methods using Octave. |
Date: |
Thu, 7 Dec 2017 05:24:01 -0700 (MST) |
Doug Stewart-4 wrote
> On Wed, Dec 6, 2017 at 6:30 PM, shall689 <
> sahallacy@
> > 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
>>
> Help-octave@
>> https://lists.gnu.org/mailman/listinfo/help-octave
>>
>
>
>
> --
> DAS[image: Certificate for 206392]
>
> <https://linuxcounter.net/user/206392.html>
>
> _______________________________________________
> Help-octave mailing list
> Help-octave@
> https://lists.gnu.org/mailman/listinfo/help-octave
Hello Doug,
n and m represent n and m in the function [b,a] = invfreqz(h,w,n,m).
Thanks,
Stephen
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
- Control System Design methods using Octave., shall689, 2017/12/05
- Re: Control System Design methods using Octave., shall689, 2017/12/06
- Re: Control System Design methods using Octave., shall689, 2017/12/06
- Re: Control System Design methods using Octave., shall689, 2017/12/06
- Re: Control System Design methods using Octave., Doug Stewart, 2017/12/06
- Re: Control System Design methods using Octave., shall689, 2017/12/06
- Re: Control System Design methods using Octave., shall689, 2017/12/06
- Re: Control System Design methods using Octave., Doug Stewart, 2017/12/06
- Re: Control System Design methods using Octave.,
shall689 <=
- Re: Control System Design methods using Octave., shall689, 2017/12/06
- Re: Control System Design methods using Octave., shall689, 2017/12/06
- Re: Control System Design methods using Octave., shall689, 2017/12/07
- Re: Control System Design methods using Octave., Doug Stewart, 2017/12/07
- Re: Control System Design methods using Octave., shall689, 2017/12/07