LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding the frequency response (magnitud and phase) of a transfer function at a certain frequency.

Dear All expert,
Can someone help me how to develop a labview program that will calculate the frequency response (both value for magnitud and phase) of a transfer funtion at a certain frequency? Meaning that my input is transfer function and a frequency, and the program will calculate for the value of magnitud and phase of the transfer function.  
 
For example, a transfer function G(s)=1/(s+2)  and a frequency,w=100rad/s is given to the program, the program will output the magnitud,M(w)=0.010 and phase(w)=-88.854.
 
 
In addition, can this program convert to dynamic link library(.DLL) files? so that i can call it from my VB.net program and just key in the input,  the output function is magnitud and phase.
 
really hope someone can help. Thank you.Smiley Happy
 
 
 
 
 
 
0 Kudos
Message 1 of 4
(3,963 Views)
On Sep 14, 9:40 pm, cckoh <x...@no.email> wrote:
> Dear All expert,
> Can someone help me how to develop a labview program that will calculate the frequency response (both value for magnitud and phase) of a transfer funtion at a certain frequency? Meaning that my input is transfer function and a frequency, and the program will&nbsp;calculate for the value of magnitud and phase of the transfer function.&nbsp;&nbsp;
> &nbsp;
> For example, a transfer function G(s)=1/(s+2)&nbsp; and a frequency,w=100rad/s is given to the program,&nbsp;the program will output the magnitud,M(w)=0.010 and phase(w)=-88.854.
> &nbsp;
> &nbsp;
> In addition,&nbsp;can this program convert to dynamic link library(.DLL) files? so that i can call it from my VB.net program and just key in the input,&nbsp; the output function is magnitud and phase.
> &nbsp;
> really hope someone can help. Thank you.Smiley Happy

One approach to calculating the magnitude and phase of a frequency
response is to use the Mathscript capability of Labview. You can do
many of the same calculations with Mathscript as you can with
Matlab.

I don't know how to access Labviews's Mathscript capbility from
VB.net But with Mathscript being able to execute most Matlab
functions maybe you can do everything you want to do in a Mathscript
Window.

Howard

Message Edited by Support on 09-18-2007 09:03 AM

0 Kudos
Message 2 of 4
(3,950 Views)

Dear Howard,

Thnk for ur reply. with the explaination you provide, i'm now succesful to build my application using the mathscript. But, may i ask for another question? that is how do we find the gain margin and phase margin of the correspond transfer function?

pls help me. thank you Smiley Very Happy 

 

Message Edited by cckoh on 09-21-2007 11:52 AM

0 Kudos
Message 3 of 4
(3,854 Views)
On Sep 21, 12:10 pm, cckoh <x...@no.email> wrote:
> Dear Howard,
> Thnk for ur reply. with the explaination you provide, i'm now succesful to build&nbsp;my application using the mathscript. But, may i ask for another question? that is how do we find the gain margin and phase margin of the correspond transfer function?
> pls help me. thank you Smiley Very Happy&nbsp;
> &nbsp;Message Edited bycckohon 09-21-2007 11:52 AM


The old fashioned method of plotting the magnitude and phase of the
frequency response and looking at the plots to determine the gain and
phase margin is still the best method. You can easily plot the
magnitude and phase of the frequency response using Mathscript and the
freqs() function.

Howard

0 Kudos
Message 4 of 4
(3,832 Views)