octavexubuntu

QtOctave on Xubuntu 14.04 - Bode not showing - error: 'create_set' undefined


Im having a hard time using QTOctave on Xubuntu. Im trying to display a Bode Diagramm but I constantly get the error message from the Octave Terminal:

 **warning: dcgain: unstable system; dimensions: nc=0, nz=2, mm=1, pp=1
error: 'create_set' undefined near line 141 column 16
error: called from:
error:   /home/octave/control-1.0.11/__bodquist__.m at line 141, colum
n 14
error:   /home/octave/control-1.0.11/bode.m at line 134, column 12
error:   /home/M/Regelungstechnik/bodeTest.m at line 7, column 1
>>>**

And it is really not a difficult M file:

tau=1/5
z=1;
n=[tau,1, 0]

G=tf(z,n)

bode(G)

I am running it on my Xubuntu 14.04 Desktop and I have the following packages for Octave installed:

>>> pkg list
Package Name       | Version | Installation directory
-------------------+---------+-----------------------
          control *|  1.0.11 | /home/octave/control-1.0.11
              fpl *|   1.2.0 | /home/octave/fpl-1.2.0
          gnuplot *|   1.0.1 | /home/octave/gnuplot-1.0.1
            ident *|   1.0.7 | /home/octave/ident-1.0.7
informationtheory *|   0.1.8 | /home/aronheck/octave/informationtheory-0.1.8
      integration *|   1.0.7 | /home/octave/integration-1.0.7
missing-functions *|   1.0.2 | /home/octave/missing-functions-1.0.2
           odebvp *|   1.0.6 | /home/octave/odebvp-1.0.6
             plot *|   1.0.8 | /home/octave/plot-1.0.8
             simp *|   1.1.0 | /home/octave/simp-1.1.0

I hope you can help me with my problem.


Solution

  • There can be two things why it's not working:

    1. Do you get the same error when you run just Octave, i.e., without QtOctave? QtOctave was abandoned many years ago it is know to not work very well with newer Octave versions.

    2. Your version of the control package is very very old. It seems that you have version 1.0.11 installed but the latest version is 2.8.0. I checked the ubuntu repositories for 14.04 and they have version 2.6.2.

    Running Octave 3.8.2 with control version 2.8.0, your code works fine for me:

    octave-cli-3.8.2:1> pkg load control
    octave-cli-3.8.2:2> tau=1/5
    tau =  0.20000
    octave-cli-3.8.2:3> z=1;
    octave-cli-3.8.2:4> n=[tau,1, 0]
    n =
    
       0.20000   1.00000   0.00000
    
    octave-cli-3.8.2:5> G=tf(z,n)
    
    Transfer function 'G' from input 'u1' to output ...
    
               1     
     y1:  -----------
          0.2 s^2 + s
    
    Continuous-time model.
    octave-cli-3.8.2:6> bode(G)
    

    enter image description here