LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

gain and phase margins from simulation data

Dear forum members,

 

Is it possible to display the Gain and Phase Margins from a Control and Simulation Loop ?

I have a simple SISO control loop (P+I controller) and this is subject to a unit step input.  I can display the output response graph via a Collector but cannot figure out how to display the Gain and Phase Margins from within the Control and Simulation Loop.

 

I note that there is a CD Gain and Phase Margin.vi that looks like what I need since it provides Gain and Phase Margin output however I cannot figure out how to interconnect this vi to what I have in the Control and Simulation Loop.

 

If anyone can assist or provide guidance it would be appreciated.

 

Regards,

0 Kudos
Message 1 of 4
(3,166 Views)

Hi bunnykins,

 Please find the necessary help from this link:

 http://zone.ni.com/reference/en-XX/help/370853D-01/lvctrldsgn/gain_and_phase_margin/..

 Generally cntrl-H will give the context-help of any labview function.

  Even you can see the examples of how Gain and Phase margins are plotted.

 

Regards,

SrikrishnaNF

Regards,
Srikrishna


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

I'm already aware of the CD Gain and Phase Margin.vi and have already read what you have sent as a link before I posted the original post (I did point this out in my orginal post!!).  The problem I have is "How to use this CD Gain and Phase Margin.vi with the Control and Simulation frame" ?  I cannot link this function since the signals are mismatched.  I also do not see any similar function within the Simulation set of functions.

I guess that I need to somehow extract the closed-loop transfer function from the Simulation frame before being able to use the CD Gain and Phase Margin.vi since this function requires a transfer function model as its input (assuming that its a TF input selected).  If anyone knows how to do this I'd appreciate some advice.

 

Regards,

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

Is your simulation linear or nonlinear ? You mention it is has a PI controller (linear without saturation / anti-windup), but not the simulated process being controlled.

 

Gain and phase margin work on linear *models*, not on the data that a simulation loop produces.

If you have a nonlinear model it will need to be linearised about an operating point first.

Remember - use the open loop system (control and process) to calculate the gain and phase margin, but they give the stability of the closed loop system.

 

This looks like a good reference if you need more info / examples:

http://www.ni.com/white-paper/6450/en

Consultant Control Engineer
www-isc-ltd.com
0 Kudos
Message 4 of 4
(3,142 Views)