Package ca.nengo.dynamics.impl

Examples of ca.nengo.dynamics.impl.SimpleLTISystem


    myIntegrator = new RK45Integrator();
  }

  private BasicTermination makeTermination() {
    Units[] units = Units.uniform(Units.UNK, 1);
    DynamicalSystem myEADynamics = new SimpleLTISystem(new float[]{-1f/.005f}, MU.I(1), MU.I(1), new float[1], units) {
      private static final long serialVersionUID = 1L;

      //override to rectify excitation (can't have negative excitation to muscles)
      public float[] f(float t, float[] u) {
        u[0] = Math.abs(u[0]);
View Full Code Here


   */
  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}
View Full Code Here

  }

  public void testClone() throws StructuralException, CloneNotSupportedException {
        System.out.println("EnsembleImplTest");
    MockExpandableNode node1 = new MockExpandableNode("1", new Origin[0],
        new Termination[]{new BasicTermination(null, new SimpleLTISystem(1, 1, 1), null, "existing")});
    MockExpandableNode node2 = new MockExpandableNode("2", new Origin[0],
        new Termination[]{new BasicTermination(null, new SimpleLTISystem(1, 1, 1), null, "existing")});
    EnsembleImpl ensemble = new EnsembleImpl("ensemble", new Node[]{node1, node2});
    ensemble.addTermination("new", MU.uniform(2, 2, 1), .005f, false);

    EnsembleImpl copy = (EnsembleImpl) ensemble.clone();
        System.out.println("Termination Length");
View Full Code Here

      super(name, Arrays.asList(origins), Arrays.asList(terminations));
      myExpandedTerminations = new LinkedHashMap<String, Termination>(10);
    }

    public Termination addTermination(String name, float[][] weights, float tauPSC, boolean modulatory) throws StructuralException {
      Termination result = new BasicTermination(this, new SimpleLTISystem(1, 1, 1), null, name);
      myExpandedTerminations.put(name, result);
      return result;
    }
View Full Code Here

      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

    }

    //functional test ...
    public static void main(String[] args) {
        float tau = .01f;
        DynamicalSystem dynamics = new SimpleLTISystem(new float[]{-1f/tau}, new float[][]{new float[]{1f/tau}}, MU.I(1), new float[1], new Units[]{Units.UNK});
        Integrator integrator = new EulerIntegrator(.0001f);
//      Noise noise = NoiseFactory.makeRandomNoise(1000, new GaussianPDF(0, 1));
        Noise noise = NoiseFactory.makeRandomNoise(1000, new GaussianPDF(0, 1), dynamics, integrator);
//      Noise noise = NoiseFactory.makeNullNoise(1);
//      Noise noise = NoiseFactory.makeExplicitNoise(new Function[]{new FourierFunction(1, 10, 1, -1)});
View Full Code Here

  public boolean getConstantRateModeSupported() {
    return mySupportedModes.length == 2;
  }

  private static DynamicalSystem getDefaultDynamics() {
    return new SimpleLTISystem(
        new float[]{2*(float)Math.PI, 2*(float)Math.PI},
        new float[][]{new float[1], new float[]{1}},
        new float[][]{new float[]{1, 0}},
        new float[2],
        Units.uniform(Units.UNK, 1));
View Full Code Here

    float baseTauPSC = baseTermination.getTau();
    EulerIntegrator integrator = new EulerIntegrator(Math.min(interneuronTauPSC, baseTauPSC) / 10f);

    float scale = 1 / interneuronTauPSC; //output scaling to make impulse integral = 1
    LinearSystem interneuronDynamics = new SimpleLTISystem(
        new float[]{-1f/interneuronTauPSC},
        new float[][]{new float[]{1f}},
        new float[][]{new float[]{scale}},
        new float[]{0f},
        new Units[]{Units.UNK}
View Full Code Here

            throw new StructuralException("The ensemble already contains a termination named " + name);
        }

        float scale = 1 / tauPSC; //output scaling to make impulse integral = 1

        LinearSystem dynamics = new SimpleLTISystem(
                new float[]{-1f/tauPSC},
                new float[][]{new float[]{1f}},
                new float[][]{new float[]{scale}},
                new float[]{0f},
                new Units[]{Units.UNK}
View Full Code Here

TOP

Related Classes of ca.nengo.dynamics.impl.SimpleLTISystem

Copyright © 2018 www.massapicom. 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.