Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Introduction To Scilab and Black-Nichols Charts

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Introduction to Scilab and Black-Nichols Charts

Scilab is similar to MATLAB except it is free. The script files are *.sce instead of M
files. We will make use of Scilab to demonstrate the deadband describing function. An
example of the script file is:

// Motor control example with hyst.


// Black-Nichols plot
// 9 October, 2007
// Analysis of Nonlinear Control Systems Graham McRuer p. 202, 203

clear
close

k=.25;
s=poly(0,'s');
h=syslin('c',k/(s*(10*s+1)));

// freq range to plot


fmin=0.003;
fmax=0.02;

black(h, fmin, fmax)


xgrid
title('Graham example with hyst.')

In this example we plotted a Black-Nichols chart for the linear transfer function h. This is
shown in dark line. The dotted line is the deadband (hyst.) inverse negative describing
function, -1/N. The equation is not shown for this function, this is your pre lab homework
assignment.
In the example we show the motor transfer function with two different gains, k, to show
that in some cases, system gain can prevent a limit cycle or unstable control. The lower
gain does not intersect the deadband –1/N so the system is stable.
Here is an example of a PID controller:

// PID controller displayed on a Black-Nichols chart


clear
close

// get the transfer function


s=poly(0,'s');
h=syslin('c',((20*s+1.0)*(5*s+1))/(20*s*(.5*s+1)));

// freq range to plot


fmin=0.0005;
fmax=0.1;

black(h, fmin, fmax)


xgrid

title('PID Controller')

// Bode plot for the same transfer function


// bode(h, fmin, fmax)
The Bode Plot for the PID controller is
Black-Nichols Chart

The Black-Nichols chart allows us to determine closed loop behavior by analyzing the
open loop transfer function. The Black-Nichols plot is a magnitude, phase angle plot of
the transfer function at different frequencies. We can superimpose the negative inverse
DF on the linear Laplace transform plot, to check for stability.

Here is a test plot that demonstrates how a Laplace transform can be plotted on the same
scale as a linear plot. This shows that you can plot the negative inverse describing
function, –1/N, on the same graph.

// Plot using Scilab


clear
close

k=.4;
s=poly(0,'s');
h=syslin('c',k/(s*(10*s+1)));

// freq range to plot


fmin=0.002;
fmax=0.02;

black(h, fmin, fmax)


xgrid

i=1;

for b = -3.14159:0.01:-3.14159/2
Np(i)=b*180/3.14159;
ap(i)=i/5;
i = i+1;
end
plot(Np,ap,'r--');
xgrid
The following open loop transfer function is plotted on a MATLAB and Scilab Black-
Nichols Charts:
4(1 + 0.5s )
S (1 + 2s )(1 + .05s + (.125s ) 2 )

Nichols Chart
60

40
0 dB
0.25 dB
0.5 dB
20 1 dB -1 dB
3 dB
Open-Loop Gain (dB)

6 dB -3 dB
0 -6 dB

-12 dB

-20 -20 dB

-40 -40 dB

-60 -60 dB

-80 dB
-80
-360 -315 -270 -225 -180 -135 -90 -45 0
Open-Loop Phase (deg)

This is a Bode plot of the same function:


Bode Diagram
100

50
Magnitude (dB)

-50

-100
-90

-135
Phase (deg)

-180

-225

-270
-2 -1 0 1 2
10 10 10 10 10
Frequency (rad/sec)

The Black-Nichols plot is not referenced in process control literature as frequently as it


used to be. The plot shows the closed loop frequency response (assuming unity feedback)
on the same plot as the open loop transfer function. This reduces the calculations required
to show the closed loop behavior. Having two sets of coordinates on the same graph
accomplishes this. One set is the open loop gain and phase shown on the y and x axis
respectively. The second set is the closed loop gain and phase. Phase is not shown on the
Scilab plot, however gain is. The response curve minimum tangent line with the closed
loop gain line will show the overshoot, in this example it is 2.3 dB. The closed loop Bode
magnitude plot shows the 2.3 dB overshoot at 1.2 radians/sec.

You might also like