2020년 10월 16일 금요일

[System Identification] 참고 자료

 


Ref.

1. https://github.com/kjyv/FloBaRoID



https://www.hindawi.com/journals/mpe/2015/879581/


http://ctms.engin.umich.edu/CTMS/index.php?aux=Activities_Pendulum



PySINDy: A Python package for the Sparse Identification of Nonlinear Dynamics from Data


Modeling and control of a rotary inverted pendulum using various methods, comparative assessment and result analysis


High Precision Control of Indirect Drive Systems Based on End-effector Sensor Information


Python for control purposes

Parameter Estimation and Model Based Control Design of Drive Train Systems 

2020년 10월 12일 월요일

[Python] 강좌

 

Python 프로그래밍 강좌

https://dojang.io/course/view.php?id=7



Python GUI programming

https://wikidocs.net/book/2165



Python-based control

https://apmonitor.com/pdc/index.php/Main/DynamicModeling


https://towardsdatascience.com/a-beginners-guide-to-simulating-dynamical-systems-with-python-a29bc27ad9b1


https://scipython.com/blog/the-double-pendulum/


https://skill-lync.com/projects/Simulation-of-a-Simple-Pendulum-on-Python-95518

[Python] * 연산자 이해

 


Ref.

https://mingrammer.com/understanding-the-asterisk-of-python/






[WSL] 관련 참고자료

 


Problem : wsl libgl error no matching fbconfigs or visuals found


Ref. : 

https://answers.ros.org/question/344999/win10wsl-error-displaying-rviz-any-ideas-on-what-the-issue-would-be/






2020년 10월 6일 화요일

[Python] Dynamics system control simulation

 

Ref.

1. https://apmonitor.com/pdc/index.php



xx. https://towardsdatascience.com/a-beginners-guide-to-simulating-dynamical-systems-with-python-a29bc27ad9b1


xx. http://www.kostasalexis.com/simulations-with-simpy.html



2020년 9월 1일 화요일

C++ stil fill 메모리 초기화 방법

 


규칙이 뭘까?



// visited
char visited[MAX_SIZE][MAX_SIZE][MAX_SIZE+1];


fill(visited[0][0], visited[MAX_SIZE][MAX_SIZE] + (MAX_SIZE+1), 0);  // 방문 배열 초기화
 
//fill(visited[0][0], visited[MAX_SIZE][0], 0);  // 방문 배열 초기화
//fill((char*)visited, (char*)(visited+MAX_SIZE), 0);  // 방문 배열 초기화


array<array<char, 100+10>, 100+10> visited;

fill(visited[0].data(), visited[0].data() + 110*110, 0);


int adj[5000][5000]; // u 에서 v 까지의 최소 거리값을 가지는 배열

fill(adj[0], adj[5000], INF);


int mat[M][N];

std::fill(*mat, *mat + M*N, value);


https://shjz.tistory.com/89

https://jacking75.github.io/cpp_stl_fill/


https://www.techiedelight.com/initialize-matrix-cpp/

2020년 5월 30일 토요일

강화학습: A2C (Advantage Actor-Critic)


강화학습: A2C study


Reference : 수학으로 풀어보는 강화학습 원리와 알고리즘


1. 환경: OpenAI Gym 의 pendulum-v0

2. A2C agent 객체 생성

  2.1. 객체 초기화
    hyper parameters 초기화 (감마, batch_size, actor 학습률, critic 학습률)
    환경 저장
    state 와 action 의 dimension
    action bound 확보
  
    results 변수 (reward)

  2.2. actor 와 critic 네트워크 생성
  
  2.2.1 actor 클래스

    2.2.1.1 actor 클래스 초기화
      - actor 신경망 생성
        input layer
        h1 layer
        h2 layer
        h3 layer
        out layer (2개, 평균과 표준편차)        

        출력 중 평균의 스케일링 (-action bound, action bound)
        네트워크 모델 생성 및 반환
      - optimizer : Adam
   
  2.2.2 critic 클래스
    2.2.2.1 critic 클래스 초기화
      - critic 신경망 생성
        input layer
        h1 layer
        h2 layer    
        h3 layer
        out layer (1개)

        신경망 모델 생성 및 반환
        모델 컴파일 (Adam, loss = 'mse')

3. agent train

  3.1. 매 에피소드마다 다음을 반복

    3.1.1. 초기화
          (states, actions, td_targets, advantages)
          에피소드 초기화 (time, episode reward, done)
          환경 초기화

    3.1.2. 한 에피소드가 완료될 때까지 학습 반복

      3.1.2.1. action sampling (get action)
        - Actor 클래스
            model.predict : 현재 state 에 대한 평균과 표준편차 얻기 (actor 신경망으로부터)
    





2020년 5월 24일 일요일