# Created by Octave 3.2.3, Tue Jan 05 12:00:54 2010 EST <mandrake@n3.mandriva.com>
# name: cache
# type: cell
# rows: 3
# columns: 8
# name: <cell-element>
# type: string
# elements: 1
# length: 4
dlqg
# name: <cell-element>
# type: string
# elements: 1
# length: 887
  O B S O L E T E * * * D O   N O T   U S E!

  Use lqg instead.

 function [K,Q,P,Ee,Er] = dlqg(A,B,C,G,Sigw,Sigv,Q,R)
 function [K,Q,P,Ee,Er] = dlqg(Sys,Sigw,Sigv,Q,R)

 design a discrete-time linear quadratic gaussian optimal controller
 for the system

  x(k+1) = A x(k) + B u(k) + G w(k)       [w]=N(0,[Sigw 0    ])
    y(k) = C x(k) + v(k)                  [v]  (    0   Sigv ])

 Outputs:
    K: system data structure format LQG optimal controller
    P: Solution of control (state feedback) algebraic Riccati equation
    Q: Solution of estimation algebraic Riccati equation
    Ee: estimator poles
    Es: controller poles
 inputs:
  A,B,C,G, or Sys: state space representation of system.
  Sigw, Sigv: covariance matrices of independent Gaussian noise processes
      (as above)
  Q, R: state, control weighting matrices for dlqr call respectively.

 See also: lqg, dlqe, dlqr

# name: <cell-element>
# type: string
# elements: 1
# length: 45
  O B S O L E T E * * * D O   N O T   U S E!


# name: <cell-element>
# type: string
# elements: 1
# length: 8
feedback
# name: <cell-element>
# type: string
# elements: 1
# length: 419
 feedback(sys1,sys2)

 Filter the output of sys1 through sys2 and subtract it from the input.

              _____________
     +        |            |
 u --->0----->|    sys1    |------->
       |-     |____________|   |
       |                       |
       |      _____________    |
       |      |            |   |
       -------|    sys2    |----
              |____________|

 This only works for SISO systems.

# name: <cell-element>
# type: string
# elements: 1
# length: 21
 feedback(sys1,sys2)


# name: <cell-element>
# type: string
# elements: 1
# length: 7
packsys
# name: <cell-element>
# type: string
# elements: 1
# length: 282
 O B S O L E T E: use ss instead.
 function Asys = packsys(a,b,c[,d,dflg])

   dflg: 0 for continuous time system, 1 for discrete-time system.

 defaults:
      D: 0 matrix of appropriate dimension.
   dflg: 0 (continuous time)

 Note: discrete-state sampling time is not included!

# name: <cell-element>
# type: string
# elements: 1
# length: 33
 O B S O L E T E: use ss instead.

# name: <cell-element>
# type: string
# elements: 1
# length: 4
rotg
# name: <cell-element>
# type: string
# elements: 1
# length: 98
 function [c,s] = rotg(a,b)
 givens rotation calculation

 NOTE: Use [c,s] = givens(a,b) instead.

# name: <cell-element>
# type: string
# elements: 1
# length: 57
 function [c,s] = rotg(a,b)
 givens rotation calculation


# name: <cell-element>
# type: string
# elements: 1
# length: 7
run_cmd
# name: <cell-element>
# type: string
# elements: 1
# length: 99
 run_cmd: short script used in demos
 prints string cmd to the screen, then executes after a pause

# name: <cell-element>
# type: string
# elements: 1
# length: 80
 run_cmd: short script used in demos
 prints string cmd to the screen, then exec

# name: <cell-element>
# type: string
# elements: 1
# length: 6
series
# name: <cell-element>
# type: string
# elements: 1
# length: 682
 Forms the series connection of two systems.

 Superseded by sysmult.  Do not use this routine!
 used internally in zp2ss

 Type of input: Transfer functions
 Command:       [num,den]=series(num1,den1,num2,den2)
 Forms the series representation of the two transfer functions.

 Type of input: State space systems
 Command:       [a,b,c,d]=series(a1,b1,c1,d1,a2,b2,c2,d2)
 Forms the series representation of the two state space system arguments.
 The series connected system will have the inputs of system 1 and the
 outputs of system 2.

 Type of input: system data structure
 Command:       syst=series(syst1,syst2)
 Forms the series representation of the two mu system arguments.

# name: <cell-element>
# type: string
# elements: 1
# length: 44
 Forms the series connection of two systems.

# name: <cell-element>
# type: string
# elements: 1
# length: 12
unitfeedback
# name: <cell-element>
# type: string
# elements: 1
# length: 746
unitfeedback(sys1)

 Creates the System Sys2(s)  from the system Sys1(s)
 when we have a negative feedback. 
               ____________
     +   e    |            |         
 u --->0----->|   Sys1(s)  |------------> y
       ^-     |____________|      |
       |                          |
       |                          |
       |                          |
       --------------<-------------

 and Returns :
            Y(s)             Sys1(s)
 Sys2(s)=  ------  =  -------------------
            U(s)         1   +    Sys1(s)


 the feedback is negative.
               ____________
              |            |         
 u ---------->|   Sys2(s)  |------------> y
              |____________|      

 This only works for SISO systems.

# name: <cell-element>
# type: string
# elements: 1
# length: 19
unitfeedback(sys1)


# name: <cell-element>
# type: string
# elements: 1
# length: 9
unpacksys
# name: <cell-element>
# type: string
# elements: 1
# length: 60
 [a,b,c,d] = unpacksys(sys)
 Obsolete.  Use sys2ss instead.

# name: <cell-element>
# type: string
# elements: 1
# length: 38
 [a,b,c,d] = unpacksys(sys)
 Obsolete.

