Examples of LTISystem


Examples of ca.nengo.dynamics.impl.LTISystem

    float wc = 2 * (float) Math.PI * cutoff;
    float[][] A = new float[][]{new float[]{0, 1}, new float[]{-wc*wc, - (float) Math.sqrt(2) * wc}};
    float[][] B = new float[][]{new float[]{0}, new float[]{wc*wc}};
    float[][] C = new float[][]{new float[]{maxForce, 0}};
    float[][] D = new float[][]{new float[]{0, 0}};
    return new LTISystem(A, B, C, D, new float[]{0, 0}, new Units[]{Units.N});
  }
View Full Code Here

Examples of ca.nengo.dynamics.impl.LTISystem

   * 1st order decay
   */
  public void testIntegrate1stOrder() {
   
    float[][] D = new float[][]{new float[]{0f}};   
    LTISystem system = new LTISystem(
        new float[][]{new float[]{-100f}},
        new float[][]{new float[]{1f}},
        new float[][]{new float[]{1f}},
        D,
        new float[]{0f},
        new Units[]{Units.UNK}
    );
   
    D = new float[][]{new float[]{1f}};   
    system = new LTISystem(
        new float[][]{new float[]{-100f}},
        new float[][]{new float[]{1f}},
        new float[][]{new float[]{1f}},
        D,
        new float[]{0f},
View Full Code Here

Examples of ca.nengo.dynamics.impl.LTISystem

  public void testIntegrate2ndOrder() {
    float eig1 = -100f;
    float eig2 = -500f;
    float a0 = -(eig1 + eig2);
    float a1 = eig1 * eig2;
    LTISystem system = new LTISystem(
        new float[][]{new float[]{0f, 1f}, new float[]{-a1, -a0}},
        new float[][]{new float[]{0f}, new float[]{1f}},
        new float[][]{new float[]{1f, 0f}},
        new float[][]{new float[]{0f}},
        new float[]{0f, 0f},
View Full Code Here

Examples of ca.nengo.dynamics.impl.LTISystem

  public void testIntegrate2ndOrderRepeated() {
    float eig1 = -100f;
    float eig2 = -100f;
    float a0 = -(eig1 + eig2);
    float a1 = eig1 * eig2;
    LTISystem system = new LTISystem(
        new float[][]{new float[]{0f, 1f}, new float[]{-a1, -a0}},
        new float[][]{new float[]{0f}, new float[]{1f}},
        new float[][]{new float[]{1f, 0f}},
        new float[][]{new float[]{0f}},
        new float[]{0f, 0f},
View Full Code Here

Examples of ca.nengo.dynamics.impl.LTISystem

   * Complex eigenvalues (oscillatory)
   */
  public void testIntegrate2ndOrderComplex() {
    float a0 = 200;
    float a1 = 30000;
    LTISystem system = new LTISystem(
        new float[][]{new float[]{0f, 1f}, new float[]{-a1, -a0}},
        new float[][]{new float[]{0f}, new float[]{1f}},
        new float[][]{new float[]{1f, 0f}},
        new float[][]{new float[]{0f}},
        new float[]{0f, 0f},
View Full Code Here

Examples of ca.nengo.dynamics.impl.LTISystem

  public void testMIMO() {
    float eig1 = -100f;
    float eig2 = -500f;
    float a0 = -(eig1 + eig2);
    float a1 = eig1 * eig2;
    LTISystem system = new LTISystem(
        new float[][]{new float[]{0f, 1f}, new float[]{-a1, -a0}},
        new float[][]{new float[]{0f, 0f, 0f}, new float[]{1f, 1f, 1f}},
        new float[][]{new float[]{1f, 0f}, new float[]{2f, 0f}},
        new float[][]{new float[]{0f, 0f, 0f}, new float[]{0f, 0f, 0f}},
        new float[]{0f, 0f},
View Full Code Here

Examples of ca.nengo.dynamics.impl.LTISystem

  /*
   * Test method for 'ca.nengo.dynamics.impl.CanonicalModel.getRealization(float[], float[], float)'
   */
  public void testGetRealization() {
    LTISystem system = CanonicalModel.getRealization(new float[]{0f, 1f}, new float[]{10f, 100f}, 1f);
   
    float[][] A = system.getA(0f);
    assertClose(0f, A[0][0]);
    assertClose(1f, A[0][1]);
    assertClose(-100f, A[1][0]);
    assertClose(-10f, A[1][1]);

    float[][] B = system.getB(0f);
    assertClose(0f, B[0][0]);
    assertClose(1f, B[1][0]);

    float[][] C = system.getC(0f);
    assertClose(1f, C[0][0]);
    assertClose(0f, C[0][1]);

    float[][] D = system.getD(0f);
    assertClose(1f, D[0][0]);
  }
View Full Code Here

Examples of ca.nengo.dynamics.impl.LTISystem

 
  /*
   * Test method for 'ca.nengo.dynamics.impl.CanonicalModel.isControllableCanonical(LTISystem)'
   */
  public void testIsControllableCanonical() {
    LTISystem system = CanonicalModel.getRealization(new float[]{0f, 1f}, new float[]{10f, 100f}, 1f);
    assertTrue(CanonicalModel.isControllableCanonical(system));
   
    system = new SimpleLTISystem(
        new float[]{-1f, -1f},
        new float[][]{new float[]{0f}, new float[]{1f}},
        new float[][]{new float[]{1f, 1f}},        
        new float[2],
        new Units[]{Units.UNK}
    );
    assertFalse(CanonicalModel.isControllableCanonical(system));
   
    system = new LTISystem(
        new float[][]{new float[]{0f, 1f}, new float[]{1f, 2f}},
        new float[][]{new float[]{1f}, new float[]{1f}},
        new float[][]{new float[]{1f, 1f}},        
        new float[][]{new float[]{0f}},
        new float[2],
View Full Code Here

Examples of ca.nengo.dynamics.impl.LTISystem

  /*
   * Test method for 'ca.nengo.dynamics.impl.CanonicalModel.changeTimeConstant(LTISystem, float)'
   */
  public void testChangeTimeConstant() {
    //distinct roots
    LTISystem system = CanonicalModel.getRealization(new float[]{0f, 1f}, new float[]{30f, 200f}, 1f);
    system = CanonicalModel.changeTimeConstant(system, 1f/5f);
    float[][] A = system.getA(0f);
    assertClose(-100f, A[1][0]);
    assertClose(-25f, A[1][1]);
   
    //complex conjugate roots
    system = CanonicalModel.getRealization(new float[]{0f, 1f}, new float[]{2f, 2f}, 1f);
    system = CanonicalModel.changeTimeConstant(system, 1f/5f);
    A = system.getA(0f);
    assertClose(-26f, A[1][0]);
    assertClose(-10f, A[1][1]);
  }
View Full Code Here

Examples of ca.nengo.dynamics.impl.LTISystem

      B[i] = new float[dim];
      B[i][i] = 1f;
      C[i] = new float[dim];
      C[i][i] = 1f / tau;
    }   
    LTISystem filter = new SimpleLTISystem(A, B, C, new float[dim], series.getUnits());
   
    return integrator.integrate(filter, series);   
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.