Question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Question

Kaushal Kishore
I want to display the Bode plot w.r.t Frequency in Hertz, but the frequency is being displayed in rad/s.Is there any option to do this in Octave?????

--
Thanking you.

With best compliments from:
KAUSHAL KISHORE TIWARI

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Question

Andreas Weber-6
Am 30.10.2017 um 13:53 schrieb Kaushal Kishore:
> I want to display the Bode plot w.r.t Frequency in Hertz, but the
> frequency is being displayed in rad/s.Is there any option to do this in
> Octave?????

How do you plot it? Please create a minimal, complete and verifiable
example. Thanks

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Question

Torsten-3
In reply to this post by Kaushal Kishore
On 30.10.2017 13:53, Kaushal Kishore wrote:
> I want to display the Bode plot w.r.t Frequency in Hertz, but the
> frequency is being displayed in rad/s.Is there any option to do this in
> Octave?????

You can try this (example for system second order, w0=1, D=0.25):

s = tf ('s')
G = @(s) 1/(s^2+0.5*s+1)   % transfer function

figure (1)
bode (G(s))       % normal bode plot over w

figure (2)
bode (G(2*pi*s))  % bode plot over f
xlabel ('Frequency [1/s]')


Torsten

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Question

Torsten-3
> Sir, I am getting this type of output:
>
>
> /*Transfer function 's' from input 'u1' to output ...
>
>  y1:  s
>
> Continuous-time model.
> error: @s: no function and no method found
> error: called from
>     buck_outer_again at line 7 column 3
> error: evaluating argument list element number 1
> error: called from
>     buck_outer_again at line 7 column 3*/
>
> What could be the problem???
>

When replying, please keep the mailing list in cc and put your answer
below the previous messages.

How does line 7 of your script look like?

Torsten

> On 31 October 2017 at 12:06, Kaushal Kishore <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Thank you so much sir....
>
>     On 31 October 2017 at 01:46, Torsten <[hidden email]
>     <mailto:[hidden email]>> wrote:
>
>         On 30.10.2017 13:53, Kaushal Kishore wrote:
>         > I want to display the Bode plot w.r.t Frequency in Hertz, but the
>         > frequency is being displayed in rad/s.Is there any option to do this in
>         > Octave?????
>
>         You can try this (example for system second order, w0=1, D=0.25):
>
>         s = tf ('s')
>         G = @(s) 1/(s^2+0.5*s+1)   % transfer function
>
>         figure (1)
>         bode (G(s))       % normal bode plot over w
>
>         figure (2)
>         bode (G(2*pi*s))  % bode plot over f
>         xlabel ('Frequency [1/s]')
>
>
>         Torsten


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Question

Kaushal Kishore
> Sir, I am getting this type of output:
>
>
> /*Transfer function 's' from input 'u1' to output ...
>
>  y1:  s
>
> Continuous-time model.
> error: @s: no function and no method found
> error: called from
>     buck_outer_again at line 7 column 3
> error: evaluating argument list element number 1
> error: called from
>     buck_outer_again at line 7 column 3*/


This is the program:


% % Buck Outer loop... User should enter values...
clear all;
close all;
clc;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 s = tf('s');
% s = poly(0,'s');
% G = syslin("c",(((-7.192924e-8*(s^2))+(-195.7839e-12*s)+12.756e-6)/(((30.12163e-9)*(s^2))+(2.50e-3*s)+1)));
 G = @(s)((-7.192924e-8*(s^2))+(-195.7839e-12*s)+12.756e-6) / (((30.12163e-9)*(s^2))+(2.50e-3*s)+1)

 bode(G(2*pi*s), '+')
 set (findobj (gcf, "type", "axes"), "nextplot", "add")
 xlabel('Frequency [1/s]')
% C = syslin("c",((((11.2193e5)*(2.75e-8)*(s^2))+((11.2193e5)*(2.511e-3)*s)+11.2193e5) / (0.075*(s^2)+s)));
 C = @(s)(((11.2193e5)*(2.75e-8)*(s^2))+((11.2193e5)*(2.511e-3)*s)+11.2193e5) / (0.075*(s^2)+s)
 bode(C(2*pi*s), '*', 'color', 'green')
   
 GH = G*C
% GH = sysmult(G,C)
%[GMgh, PMgh, w_pcgh, w_gcgh] = margin(GH)
 bode(GH(2*pi*s), 'o', 'color', 'red')
 
 grid on

On 31 October 2017 at 14:02, Torsten <[hidden email]> wrote:
> Sir, I am getting this type of output:
>
>
> /*Transfer function 's' from input 'u1' to output ...
>
>  y1:  s
>
> Continuous-time model.
> error: @s: no function and no method found
> error: called from
>     buck_outer_again at line 7 column 3
> error: evaluating argument list element number 1
> error: called from
>     buck_outer_again at line 7 column 3*/
>
> What could be the problem???
>

When replying, please keep the mailing list in cc and put your answer
below the previous messages.

How does line 7 of your script look like?

Torsten

> On 31 October 2017 at 12:06, Kaushal Kishore <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Thank you so much sir....
>
>     On 31 October 2017 at 01:46, Torsten <[hidden email]
>     <mailto:[hidden email]>> wrote:
>
>         On 30.10.2017 13:53, Kaushal Kishore wrote:
>         > I want to display the Bode plot w.r.t Frequency in Hertz, but the
>         > frequency is being displayed in rad/s.Is there any option to do this in
>         > Octave?????
>
>         You can try this (example for system second order, w0=1, D=0.25):
>
>         s = tf ('s')
>         G = @(s) 1/(s^2+0.5*s+1)   % transfer function
>
>         figure (1)
>         bode (G(s))       % normal bode plot over w
>
>         figure (2)
>         bode (G(2*pi*s))  % bode plot over f
>         xlabel ('Frequency [1/s]')
>
>
>         Torsten




--
Thanking you.

With best compliments from:
KAUSHAL KISHORE TIWARI

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Question

Doug Stewart-4


On Tue, Oct 31, 2017 at 8:49 AM, Kaushal Kishore <[hidden email]> wrote:
> Sir, I am getting this type of output:
>
>
> /*Transfer function 's' from input 'u1' to output ...
>
>  y1:  s
>
> Continuous-time model.
> error: @s: no function and no method found
> error: called from
>     buck_outer_again at line 7 column 3
> error: evaluating argument list element number 1
> error: called from
>     buck_outer_again at line 7 column 3*/


This is the program:


% % Buck Outer loop... User should enter values...
clear all;
close all;
clc;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 s = tf('s');
% s = poly(0,'s');
% G = syslin("c",(((-7.192924e-8*(s^2))+(-195.7839e-12*s)+12.756e-6)/(((30.12163e-9)*(s^2))+(2.50e-3*s)+1)));
 G = @(s)((-7.192924e-8*(s^2))+(-195.7839e-12*s)+12.756e-6) / (((30.12163e-9)*(s^2))+(2.50e-3*s)+1)

 bode(G(2*pi*s), '+')
 set (findobj (gcf, "type", "axes"), "nextplot", "add")
 xlabel('Frequency [1/s]')
% C = syslin("c",((((11.2193e5)*(2.75e-8)*(s^2))+((11.2193e5)*(2.511e-3)*s)+11.2193e5) / (0.075*(s^2)+s)));
 C = @(s)(((11.2193e5)*(2.75e-8)*(s^2))+((11.2193e5)*(2.511e-3)*s)+11.2193e5) / (0.075*(s^2)+s)
 bode(C(2*pi*s), '*', 'color', 'green')
   
 GH = G*C
% GH = sysmult(G,C)
%[GMgh, PMgh, w_pcgh, w_gcgh] = margin(GH)
 bode(GH(2*pi*s), 'o', 'color', 'red')
 
 grid on






Is this what you want?

% % Buck Outer loop... User should enter values...
clear all;
close all;
clc;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 s = tf('s');
% s = poly(0,'s');
% G = syslin("c",(((-7.192924e-8*(s^2))+(-195.7839e-12*s)+12.756e-6)/(((30.12163e-9)*(s^2))+(2.50e-3*s)+1)));
 G = ((-7.192924e-8*(s^2))+(-195.7839e-12*s)+12.756e-6) / (((30.12163e-9)*(s^2))+(2.50e-3*s)+1)
bode(G)
 #bode(G(2*pi*s), '+')
 set (findobj (gcf, "type", "axes"), "nextplot", "add")
 xlabel('Frequency [1/s]')
% C = syslin("c",((((11.2193e5)*(2.75e-8)*(s^2))+((11.2193e5)*(2.511e-3)*s)+11.2193e5) / (0.075*(s^2)+s)));
 C = (((11.2193e5)*(2.75e-8)*(s^2))+((11.2193e5)*(2.511e-3)*s)+11.2193e5) / (0.075*(s^2)+s)
 #bode(C(2*pi*s), '*', 'color', 'green')
 bode(C)  
 GH = G*C
% GH = sysmult(G,C)
%[GMgh, PMgh, w_pcgh, w_gcgh] = margin(GH)
 bode(GH, 'o', 'color', 'red')
 
 grid on

--
DAS


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Question

Kaushal Kishore
Thank you...

On 31 October 2017 at 19:55, Doug Stewart <[hidden email]> wrote:


On Tue, Oct 31, 2017 at 8:49 AM, Kaushal Kishore <[hidden email]> wrote:
> Sir, I am getting this type of output:
>
>
> /*Transfer function 's' from input 'u1' to output ...
>
>  y1:  s
>
> Continuous-time model.
> error: @s: no function and no method found
> error: called from
>     buck_outer_again at line 7 column 3
> error: evaluating argument list element number 1
> error: called from
>     buck_outer_again at line 7 column 3*/


This is the program:


% % Buck Outer loop... User should enter values...
clear all;
close all;
clc;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 s = tf('s');
% s = poly(0,'s');
% G = syslin("c",(((-7.192924e-8*(s^2))+(-195.7839e-12*s)+12.756e-6)/(((30.12163e-9)*(s^2))+(2.50e-3*s)+1)));
 G = @(s)((-7.192924e-8*(s^2))+(-195.7839e-12*s)+12.756e-6) / (((30.12163e-9)*(s^2))+(2.50e-3*s)+1)

 bode(G(2*pi*s), '+')
 set (findobj (gcf, "type", "axes"), "nextplot", "add")
 xlabel('Frequency [1/s]')
% C = syslin("c",((((11.2193e5)*(2.75e-8)*(s^2))+((11.2193e5)*(2.511e-3)*s)+11.2193e5) / (0.075*(s^2)+s)));
 C = @(s)(((11.2193e5)*(2.75e-8)*(s^2))+((11.2193e5)*(2.511e-3)*s)+11.2193e5) / (0.075*(s^2)+s)
 bode(C(2*pi*s), '*', 'color', 'green')
   
 GH = G*C
% GH = sysmult(G,C)
%[GMgh, PMgh, w_pcgh, w_gcgh] = margin(GH)
 bode(GH(2*pi*s), 'o', 'color', 'red')
 
 grid on






Is this what you want?

% % Buck Outer loop... User should enter values...
clear all;
close all;
clc;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 s = tf('s');
% s = poly(0,'s');
% G = syslin("c",(((-7.192924e-8*(s^2))+(-195.7839e-12*s)+12.756e-6)/(((30.12163e-9)*(s^2))+(2.50e-3*s)+1)));
 G = ((-7.192924e-8*(s^2))+(-195.7839e-12*s)+12.756e-6) / (((30.12163e-9)*(s^2))+(2.50e-3*s)+1)
bode(G)
 #bode(G(2*pi*s), '+')
 set (findobj (gcf, "type", "axes"), "nextplot", "add")
 xlabel('Frequency [1/s]')
% C = syslin("c",((((11.2193e5)*(2.75e-8)*(s^2))+((11.2193e5)*(2.511e-3)*s)+11.2193e5) / (0.075*(s^2)+s)));
 C = (((11.2193e5)*(2.75e-8)*(s^2))+((11.2193e5)*(2.511e-3)*s)+11.2193e5) / (0.075*(s^2)+s)
 #bode(C(2*pi*s), '*', 'color', 'green')
 bode(C)  
 GH = G*C
% GH = sysmult(G,C)
%[GMgh, PMgh, w_pcgh, w_gcgh] = margin(GH)
 bode(GH, 'o', 'color', 'red')
 
 grid on

--
DAS




--
Thanking you.

With best compliments from:
KAUSHAL KISHORE TIWARI

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave