help-octave
[Top][All Lists]

## Re: Feedback for octave

 From: Andrei Subject: Re: Feedback for octave Date: Thu, 08 Mar 2007 17:24:15 -0600 User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.13) Gecko/20060414

```Doug Stewart wrote:

```
```Andrei Gutierrez wrote:

```
```I have a problem to define the arguments for the feedback for control.
for example:
num=1;
den=[1 10 1];
feedback(tf(num,den),tf(1,1))

It is OK, but if My H(s) is not 1, for example H(s) = s + 1 ...

numh=[1 1];
denh=1;
feedback(tf(num,den),tf(numh,denh))

Gives me the error that the zeros are more than the poles, but in the
feedback its common to have a numerator like this.
Any idea?-.
Thank you.

_______________________________________________
Help-octave mailing list
https://www.cae.wisc.edu/mailman/listinfo/help-octave

```
```
```
You can get around this problem by adding a pole out at a "high" frequency so that its influence on the system will be minimal.
```So try this

num = 1
den=[1 10 1]

numh=[1 1]
denh=1

%%now make a pole at 100
%%with a gain of 1
np=100
dp=[1 100]
%% now make H  as:
nh=conv(numh,np)
dh=conv(1,dp)

sys1=feedback(tf2sys(num,den),tf2sys(nh,dh));

```
this makes a pole and a zero at about -100 and they cancel each other out. and your step response and and bode will be OK in the region that you are concerned about.
```

the zero is at -100
the pole of the closed loop using this method are:

-98.8865
-10.9285
-0.1851

the theoretical poles are
-10.8151
-0.1849

If you put the added pole out farther then it even has less effect.

Doug Stewart

```
```Ok thanks it works,
```
Im doing a program to find the gain (Z) for a specific damping ratio (Z), would it be useful to upload? or theres another function that already does?
```
```