Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev 정리 #2

Open
wants to merge 58 commits into
base: master
Choose a base branch
from
Open

Dev 정리 #2

wants to merge 58 commits into from

Conversation

idonno2k
Copy link

정리

jaesikyoon and others added 30 commits May 25, 2016 19:59
This reverts commit d416a47.
# Conflicts:
#	oroca_bldc_PC/README.md
아이디어가 필요합니다...
인터럽트를 정리하여 2개 제어가능하도록 수정예정

마브링크 통신 테스트 예정
05715872.pdf 문서 참고

spi로 디버깅을 해야하는데 컴파일이 안되서 못살리고 있음 ㅜㅜ
hall sensor 2로 각도를 측정할 때 3고조파에 의하여 각도오차 발생
이를 개선하는 논문을 보고 시뮬레이션 해봄
05715872.pdf 자료 참고....

결과
시뮬레이션 결과 보상 알고리즘에서 발진발생  원인을 알수 없음 ㅠㅠ
hall sensor 2로 각도를 측정할 때 3고조파에 의하여 각도오차 발생
이를 개선하는 논문을 보고 시뮬레이션 해봄
05715872.pdf 자료 참고....

결과
시뮬레이션 결과 보상 알고리즘에서 발진발생  원인을 알수 없음 ㅠㅠ
입력 센싱신호의 범위가 -1 ~ 1의 값을 갖도록 해야 필터가 동작함
setup_param()함수를  mcpwm_init에 추가함(버그수정)
모터테스트는 이코드로 진행하면 됨

rev1에서 dev로 브런치 명 수정함
-conf_general.c는 완전히 삭제하여도 문제 없어보임(이부분은 fw_dev브랜치에도 적용예정)
-일단 컴파일 됨
- 필요없는 전부 삭제
- uart와 spi가 동작하는지는 디버깅 해야함
adc 채널 셋팅쪽 버그수정
제어기튜닝..
uart 디버깅..

dq변환시 alpha 상을 반전 시켜서 계산해야 함..
   ParkParm.qId = -ParkParm.qIalpha*cosf(ParkParm.qAngle) + ParkParm.qIbeta*sinf(ParkParm.qAngle);
   ParkParm.qIq = ParkParm.qIalpha*sinf(ParkParm.qAngle) + ParkParm.qIbeta*cosf(ParkParm.qAngle);

초기에 adc오프셋을 설정하도록 해야하는데 이 부분이 빠져있었음...
SetupParm();

adc 설정할 때 드리거가 tim8_ccr1에 동기화 되도록..수정함

그외 생각안남...
이후 오로카 bldc에 맞게 코드수정 예정
-RPM, 각속도, 주파수 측정
-q a를 이용해서 속도제어도 가능함

일단 여기까지....
-데모에서 사용했던 ui는 삭제
static THD_WORKING_AREA(periodic_thread_wa, 128);
static THD_FUNCTION(periodic_thread, arg)
chibios메뉴얼에서는 이런식으로 사용함

-app.c에서 uart_print시 무한 부팅 걸리는 건 uart_print 삭제하니 동작함
 이유는 알수 없지만 CPP와 c의 연결 문제이지 않을까함....

-서보에서 값을 받아보긴했는데 동작을 안하는 것루 봐서 좀더 삽질이 필요함
paulbhpark and others added 28 commits April 19, 2017 06:34
-서보핀 PC9핀을 PB7핀으로 변경 하드웨어 수정필요
-time out 관련 task는 검증안됨...
마브링크 CS코드가 생성이 안되고 에러가 나는 것으로 확인됨
결국 마브링크 코드를 뒤져야 하는 것인지 ㅠㅠ
동작테스트 완료
동작영상은 오로카 게시판에...
app단으로 구조올림  (진행중)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants