问题描述:

I cannot find out how you would show the unit circle centered at -1 on a Nyquist plot.

When I plot `nyquist(L)`

with `L(s) = P(s)*C(s)`

being my loop function, it only shows the nyquist plot itself. Using `grid on`

also doesn't do this.

Can someone help me please?

Once you create your Nyquist plot, use `hold on;`

so we can draw a circle in MATLAB on top of your Nyquist plot. If you recall from polar co-ordinates, we can parameterize a point on a circle to be the following:

`x = r*cos(theta);`

`y = r*sin(theta);`

`r`

would be the radius of your circle while `theta`

is the angle it makes with respect to the origin. `theta`

has its domain between `[0,2*pi]`

. For the unit circle, `r = 1`

. We would then substitute angles (`theta`

) between 0 to `2*pi`

. You also need to shift your circle so that the origin is at `Re = -1, Im = 0`

. As such, do this:

```
n = 1000; %// Define number of points on circle
theta = linspace(0, 2*pi, n);
x = cos(theta);
y = sin(theta);
nyquist(L); %// Spawn Nyquist plot
hold on;
plot(x-1, y); %// Unit circle
```

Here's a quick example for you. Using `L = tf(9, [1 6 9]);`

to represent our transfer function of the open-loop system, using the above code produces the following plot:

Bear in mind that I had to adjust the limits of the axis so you could see the unit circle. I did this by invoking`axis`

in the following way after the plot was shown:

```
axis([-2 2 -1 1]);
```

The real axis limits span from -2 to 2, and the imaginary axis limits span from -1 to 1.

您可能感兴趣的文章：

- python - django view not passing a value to the temple using render_to_response
- Mongodb Sharded cluster with replica sets
- c++ - Finding the location of colour table in 8 bit BMP
- Lotus Notes - Move email to folder quickly
- php - ErrorException in Controller Argument 2 passed to Controller::__construct()
- php - Reading a specific line from a text file
- clr - Any implementation of an Unrolled Linked List in C#?
- Finding Hudson Log Files
- Forward to a payment-gateway together with POST data using cURL (or any other PHP server side solution)
- WCF in Winforms app - is it always single-threaded?

随机阅读：

**推荐内容**-

**热点内容**