Communicating with the VESC using UART


Posted on October 9, 2015

Many people have asked me how to communicate with the VESC using UART, but I did not have a good answer since I haven’t written any tutorial about that and the only thing I could refer to was the BLDC Tool code. Now I have created a project for the STM32F4 discovery board that implements UART communication with the VESC where the full interface is implemented. In this post I will try to explain how the code works and how to port it to other platforms.

많은 사람들은 제게 UART를 이용해서 VESC와 어떻게 통신하는지 물어왔습니다. 그러나 저는 그것에 대해서 어떤 가이드를 작성하지 않았기 때문에 좋은 답장을 갖고 있진 않습니다. 제가 참조할 수 있는 유일한 것은 BLDC Tool의 코드입니다. 저는 완전한 인터페이스가 구현된 VESC와 UART 통신을 구현한 STM32F4 discovery 보드에 대한 프로젝트를 만들었습니다. 이 글에서 저는 어떻게 코드가 동작하고 다른 플랫폼으로 어떻게 포팅하는지를 설명할 것입니다.


Getting started

Start by downloading the code from github: 

https://github.com/vedderb/bldc_uart_comm_stm32f4_discovery



If you have a stm32f4 discovery board, you can upload the code to it and test it by following the tutorial in my VESC Post for installing the toolchain. After that, just connect both USB ports of the discovery board (one for the built in programmer and one for the serial terminal) and type make upload from the project directory. Don’t forget to connect rx (PB11), tx (PB10) and gnd from the discovery board to tx, rx and gnd on the VESC. The discovery board will show up as a USB-serial port and you can use a serial terminal such as screen or gtkterm to access a simple command line interface on it. Only a few commands are implemented for the command line interface (type help to list them), but a good exercise is to write more commands in the main file using the provided interface. Doing that with the bldc_interface code should be quite straight forward.

여러분이 stm32f4 discovery 보드를 갖고 계시다면, 여러분은 코드를 업로드 할 수 있고 toolchain을 설치하기 위해서 제 VESC 글에 가이드에 따라 테스트 할 수 있습니다. 그 후에 discovery 보드의 양 USB 포트를 연결하세요(프로그래머에 설치된 하나와 시리얼 터미널에 하나) 그리고 프로젝트 디렉토리로부터 make upload를 치시기 바랍니다. discovery 보드의 rx (PB11), tx (PB10) 그리고 gnd를 VESC의 tx, rx 그리고 gnd를 연결하는 것을 잊지 마십시오. discovery 보드는 USB-serial 포트로 나타나고 여러분은 간단한 command line 인터페이스를 접근하기 위해서 screen 혹은 gtkterm과 같은 시리얼 터미널을 이용할 수 있습니다. command line 인터페이스를 위해서 오직 몇 개의 명령에 대해서 구현되어졌습니다(리스트하기 위해서 help를 치세요), 그러나 좋은 연습은 제공된 인터페이스를 이용해서 메인 파일에 좀더의 명령어를 작성할 수 있습니다. bldc_interface 코드와 그것을 하는 것은 매우 직관적(straight forward)입니다.


Understanding the implementation

The VESC communicates over UART using packets with the following format:

VESC는 다음의 포맷을 갖는 패킷을 사용하여 UART로 통신합니다:


    • One Start byte (value 2 for short packets and 3 for long packets)

    • One or two bytes specifying the packet length

    • The payload of the packet

    • Two bytes with a CRC checksum on the payload

    • One stop byte (value 3)


The higher level of the VESC communication code is the same for the USB, UART and CAN ports, so everything that can be done from BLDC Tool can be done from the other ports as well. Therefore I have abstracted out the higher layer of the communication into separate files so that it can be reused for CAN-bus and USB without modifying the rest of the code later.

VESC 통신 코드의 상위 레벨은 USB, UART 그리고 CAN 포트에 대해서도 동일합니다. 그래서 BLDC Tool로부터 할 수 있었던 것은 모두 다른 포트들에서도 할 수 있습니다. 그러므로 저는 통신의 상위 레이어를 분리된 파일들로 구체화 하였습니다. 그 결과 이것은 CAN 버스와 USB에 대해서 나중에 코드의 나머지 수정 없이 다시 사용할 수 있습니다.


The important files in the project, which you can use for your implementation, are the following. They are plain C files and don’t have any hardware dependencies.

여러분이 여러분의 구현을 위해서 사용할 수 있는 프로젝트에서 중요한 파일들은 다음과 같습니다. 일반 C 파일이며 어떤 하드웨어 의존성을 갖지 않습니다.


bldc_interface.c and bldc_interface.h


These files can assemble the payload for all the commands that the VESC supports. They can also interpret packets from the VESC and extract the data from them. Notice that only the payload is handled in these files, not the start, stop, length and checksum bytes since these are different for the CAN interface.

이들 파일은 VESC가 지원하는 모든 명령들의 페이로드(payload)를 조립할 수 있습니다. 이들 파일은 또한 VESC로부터 패킷을 번역하고 그들로부터 데이터를 추출할 수 있습니다. 이들은 CAN 인터페이스에서 다르기 때문에 start, stop, length 그리고 checksum bytes가 아닌 오직 페이로드만이 이들 파일에서 다룰 수 있다는 것을 기억하세요. 


datatypes.h


The data structures used by the VESC.

VESC에서 사용된 데이터 구조입니다.


buffer.c and buffer.h


Helper functions for for going between C types and byte arrays. These are used by the bldc_interface files.

C 타입 그리고 byte 배열사이에 Helper 기능들. 이들은 bldc_interface 파일에서 사용됩니다.

crc.c and crc.h


For calculating the CRC checksum

CRC checksum을 계산하기 위함


packet.c and packet.h


For assembling the packets for the VESC with start, stop, length and checksum bytes. These files also have a state machine where one byte received from the VESC can be added at a time to assemble a packet and check the checksum correctness.

start, stop, length 그리고 checksum bytes와 함께 VESC를 위한 패킷의 조립을 위함. 이들 파일은 또한 VESC로부터 수신된 한 바이트가 패킷을 조립하기 위해서 한번에 추가되고 checksum이 올바른지 체크할 수 있도록 하는 state machine을 갖습니다.


bldc_interface_uart.c and bldc_interface_uart.h


Connects packet and bldc_interface to provide a clean UART interface. This is where the user has to make the connection to the UART interface for the platform of choice.

깨끗한 UART 인터페이스 제공하기 위해서 패킷과 bldc_interface을 연결합니다. 이는 사용자가 선택한 플랫폼의 UART 인터페이스로 연결해야 하는 곳입니다.


All of these files rely heavily on function pointers. This might sound complicated at first, but it is actually quite convenient and easy to use. The connection between these files and the UART port is done in the file comm_uart.c, which is the file that you have to implement if you want to port this to a different platform. Also, if you decide to use some other port than UART such as CAN or USB, you only have to re-implement this file and the higher level implementation will work as before.

이들 파일 모두는 함수 포인터에 강하게 의존합니다. 이는 처음에 복잡하게 들려질 수 있습니다, 그러나 이는 실제로 매우 편리하고 사용이 용이합니다. 이들 파일과 UART 포트의 연결은 comm_uart.c 파일에서 이루어집니다. 이 파일은 여러분이 이를 다른 플랫폼으로 포트하기를 원한다면 구현해야만 하는 파일입니다. 또한 여러분이 UART보다 CAN 혹은 USB와 같은 다른 포트를 사용하기로 했다면 여러분은 단지 이 파일을 다시 구현해야 합니다. 그리고 상위 레벨 구현은 전과 같이 동작할 것입니다.


Making the platform-specific UART connection

This should be rather straight forward. The bldc_interface_uart files have three functions that have to be used:

이것은 오히려 직관적일 수 있습니다. bldc_interface_uart 파일은 3가지 함수를 갖습니다:


bldc_interface_uart_init


This is the init function that takes a function pointer to a function that you provide for sending data on the UART. You can use it something like this:

이것은 UART 상에 데이터를 보내기 위해 여러분 제공한 함수로 함수 포인터를 옮겨 놓는 함수의 초기화 함수입니다. 여러분은 이를 다음과 같이 사용할 수 있습니다:


/**

 * A function that will send the bytes in *data with length len on the UART

 */

static void send_packet(unsigned char *data, unsigned int len) {

// Your implementation

}

 

// Your init function

void comm_uart_init(void) {

// Initialize your UART...

 

// Initialize the bldc interface and provide your send function

bldc_interface_uart_init(send_packet);

}


bldc_interface_uart_process_byte


Call this function every time a byte is received on the UART with the received byte. It will run the state machine in the packet assembler and the callbacks in bldc interface will be called when the packets are ready.

UART 상에 한 바이트가 도착할 때마다 이 함수를 호출합니다. 이는 packet assembler에서 state machine을 동작시키고 bldc 인터페이스에서 callback은 패킷이 준비되었을 때 호출될 것입니다.


bldc_interface_uart_run_timer


Call this function every millisecond to reset the packet state machine after a timeout in case data is lost.

데이터를 잃어버린 경우에 대해서 timeout 후에 packet state machine을 리셋하기 위해서 매 ms 마다 이 함수를 호출합니다.


Notice that bldc_interface_uart_process_byte and bldc_interface_uart_run_timer can be omitted it you only plan to send data to the VESC and not read anything.

bldc_interface_uart_process_byte와 bldc_interface_uart_run_timer는 여러분이 VESC에 데이터를 보내고 어떠한 것도 읽지 않을 계획이라면 생략될 수 있습니다.

 

In this example project this is implemented in comm_uart.c. This implementation is a bit more complicated than necessary because it uses threads to run the data processing to not block the UART while running the callbacks and to not run the callbacks from an interrupt scope, but a much simpler implementation can also be done if you don’t have an RTOS. You could call bldc_interface_uart_process_byte directly from an interrupt handler every time you receive a byte.

이 예제 프로젝트에서 이것은 comm_uart.c에서 구현되어졌습니다. 이들 구현은 필요보다 다소 복잡합니다. 왜냐하면 이는 callback이 작동하는 동안 UART를 막지 많고 데이터 프로세싱을 위한 그리고 interrupt scope로부터 callback이 작동하는 것을 막기 위해서 스레드를 사용하기 때문입니다. 그러나 여러분이 RTOS를 갖고 있지 않다면 또한 훨씬 간단하게 구현될 수 있습니다. 여러분은 여러분이 한 바이트를 수신한 때마다 interrupt handler로부터 곧바로 bldc_interface_uart_process_byte를 호출할 수 있습니다.


Using bldc_interface

After you are done with the hardware specific UART implementation, you can use bldc_interface in your application. To set the current, duty cycle etc. just call the corresponding function from the setters e.g.

여러분이 하드웨어에 요구되는 UART 구현을 완료한 후에 여러분은 여러분의 애플리케이션에서 bldc_interface를 사용할 수 있습니다. 예를 들어, 전류와 듀티 싸이클 등을 설정하기 위해서 설정기(setters)로부터 관련함수를 호출합니다.


// Run the motor in current control mode with 10A commanded current

bldc_interface_set_current(10.0);


You can do everything that BLDC Tool can do, including changing the configuration (you should read the old configuration before updating it though). Notice that you have to call these functions at regular intervals to not trigger the timeout in the VESC that will release the motor if no new commands have been received for longer than the configured time for safety reasons. This can be done either by calling the corresponding setters at regular intervals or by calling the bldc_interface_send_alive function.

여러분은 BLDC Tool이 할 수 있는 모든 것을 할 수 있습니다, 설정을 변경(하지만 업데이트 전에 이전 설정을 읽어야만 합니다)하는 것을 포함해서 말입니다. 여러분은 VESC에서 timeout이 작동하지 않기 위해서 정기적인 간격으로 이들 함수를 호출해야 함을 기억하세요! VESC는 안전의 이유로 설정된 시간보다 긴 시간 동안 어떠한 새로운 명령을 수신할 수 없다면, 모터를 통제권을 내려놓습니다. 이는 정기적인 간격으로 관련 설정기를 호출하거나 bldc_interface_send_alive 함수를 호출하는 것에 의해서 해결될 수 있습니다.


Reading data

Reading data is done with getter functions and callback function pointers. For example, to get realtime data from the VESC, first set a callback to your function for handling the data using bldc_interface_set_rx_value_func and then request the data with bldc_interface_get_values. It can look something like this:

데이터를 읽는 것은 getter 함수와 callback 함수 포인터들과 함께 이루어집니다. 예를 들어, VESC로부터 실시간 데이터를 얻기 위해서 우선 bldc_interface_set_rx_value_func 함수를 사용해서 데이터를 핸들링 하기 위해서 여러분의 함수로 callback을 설정하세요 그리고 나서 bldc_interface_get_values 함수로 데이터를 요청합니다. 이는 다음과 같이 보여집니다:


// Your callback function for the received data. In this case you simply

// print it using printf.

void bldc_val_received(mc_values *val) {

printf("Input voltage: %.2f V\r\n", val->v_in);

printf("Temp:          %.2f degC\r\n", val->temp_pcb);

printf("Current motor: %.2f A\r\n", val->current_motor);

printf("Current in:    %.2f A\r\n", val->current_in);

printf("RPM:           %.1f RPM\r\n", val->rpm);

printf("Duty cycle:    %.1f %%\r\n", val->duty_now * 100.0);

printf("Ah Drawn:      %.4f Ah\r\n", val->amp_hours);

printf("Ah Regen:      %.4f Ah\r\n", val->amp_hours_charged);

printf("Wh Drawn:      %.4f Wh\r\n", val->watt_hours);

printf("Wh Regen:      %.4f Wh\r\n", val->watt_hours_charged);

printf("Tacho:         %i counts\r\n", val->tachometer);

printf("Tacho ABS:     %i counts\r\n", val->tachometer_abs);

printf("Fault Code:    %s\r\n", bldc_interface_fault_to_string(val->fault_code));

}


// Somewhere in your init code you can set your callback function(s).

bldc_interface_set_rx_value_func(bldc_val_received);


// Every time you want to read the realtime data you call the corresponding getter.

// This will send the get command to the VESC and return. When the data is received

// the callback will be called from the UART interface.

bldc_interface_get_values();


Have a look at main.c to see some examples of this.

예제를 보기 위해서 main.c를 보세요


That’s it! I hope this is enough to get started with UART communication to the VESC.

VESC로의 UART 통신을 시작하기에 충분하기를 희망합니다.



Posted by Nature & Life


센서없는 BLDC 모터의 startup 토크


Posted on August 16, 2014

One of the major challenges when working on my custom open source ESC was to get good startup torque and low-speed performance with sensorless motors. This challenge has been addressed in several places around the net:

저 개인적 오픈 소스 ESC를 만들 때 주요한 도전 중의 하나는 센서 없는 모터에서 좋은 startup 토크와 낮은 속도에서의 좋은 성능을 얻는 것이었습니다. 이 도전은 인터넷의 여러 군데에서 시도되어 왔습니다:


  • Team Novak은 왜 센서를 갖는 시스템이 센서 없는 시스템보다 우수한지를 설명한 글: 

http://teamnovak.com/tech_info/view_article/24


  • 역시 같은 주제를 다룬 전기 스쿠터(electric scooter)에 대한 글:

http://www.instructables.com/id/The-New-and-Improved-Brushless-Electric-Scooter-Po/step4/Controlling-the-Outrunner-Sensorless-or-Sensored/


  • 홀(hall) 센서를 갖는 모터로 개조한 metroboard: 

http://metro-board.com/brushless-outrunner-motor-testing/


  • 마블 전기 스케이트보드 또한 홀 센서를 사용한다:

http://howtomakeanelectricskateboard.wordpress.com/2014/06/22/marbel-kickstarter/


  • 표준 센서없는 hobby ESC를 갖는 electric longboard의 비디오입니다. 분명한 startup과 낮은 속도에서 이슈가 있습니다: 

http://www.youtube.com/watch?v=SNt70MdUh0Q


Techniques I used

센서 없이 부드럽고 빠른 startup을 얻기 위해서 저는 몇가지 트릭을 사용했습니다, 즉:


  • There are no hardware low-pass filters that introduce phase delay. Such filters can be avoided because the ADC samples are synchronized to the PWM timer and adjusted dynamically every time the duty cycle or switching frequency is changed.

  • 위상 지연(phase delay)을 야기하는 어떠한 하드웨어적인 저역 통과 필터(low-pass filters)들을 사용하지 않았습니다. 그러한 필터들은 ADC 샘플들이 PWM 타이머와 동기화되고, 듀티 싸이클 혹은 스위칭 주파수가 변할 때마다 동적으로 맞추기 때문에 피할 수 있습니다.


  • After a zero crossing, the area under the voltage is integrated until a threshold for commutation based on the motor parameters. This integration is robust agaist acceleration and provides good SNR since an integrator is a low-pass filter. 

  • Zero crossing 후에 전압의 면적은 모터 파라미터들에 근거한 commutation의 threshold까지 적분됩니다. 이 적분은 가속에 대해서 robust하고 적분기가 저역 통과 필터이기 때문에 좋은 SNR 특성을 제공합니다.


  • There is a parameter that defines the voltage coupling between the windings when measuring the back-emf. This make a huge difference when running at low speeds with low duty cycle. This compensation has a RPM dependence though, which is something I tried to avoid where possible because the RPM estimation has a delay and thus causes problems during acceleration. 

  • BEMF를 측정할 때 고정자의 코일 사이에 커플링 전압(voltage coupling)을 정의하는 파라미터가 존재하고 이것은 낮은 듀티 싸이클과 함께 낮은 속도로 회전할 때 큰 차가 존재합니다. 그러므로 이들의 보상은 RPM 의존성을 갖습니다. RPM 추정은 시간 지연을 야기하고 그러므로 가속 동안에 문제를 일의킬 수 있기 때문에 가능한한 여기서 피하고자 시도한 것입니다.


  • To get better voltage samples, the switching frequency is adaptive and proportional to the duty cycle. This is because the back-EMF only can be sampled during the ON-time of the PWM cycle and low duty cycles have short ON time. Since the motor is running slowly on low duty cycles, sampling and switching does not have to be as fast to keep up with the motor which makes this less of a problem. Lower switching frequency also decreases switching losses, which is a positive side-effect. 

  • 우수한 전압 샘플을 얻기 위해서 스위칭 주파수는 적응형(adaptive)이고 듀티 싸이클에 비례합니다. 이는 BEMF가 오직 PWM 싸이클의 ON 타임 동안에 그리고 짧은 ON 타임을 갖는 낮은 듀티 싸이클 동안에 샘플링되기 때문입니다. 모터는 낮은 듀티 싸이클에서 천천히 회전하기 때문에 샘플링과 스위칭은 모터를 따라 잡기 위해서 충분히 빠르지 않아야만 하고 이는 문제가 덜 되도록 합니다. 낮은 주파수 일수록 또한 switching loss를 감소시키는데 이는 부수적으로 긍정적인 효과를 갖는 다는 것입니다.


  • When the motor is un-driven, the back-emf on all phases is analysed to track the position, direction and speed of the motor. So when the motor is already spinning, the algorithm will begin in the exact state of the motor (position, duty-cycle, direction). 

  • 모터가 구동되지 않을 때 모든 상에 BEMF는 위치, 회전방향, 모터의 속도를 추적하기 위해서 분석됩니다. 그래서 모터가 이미 회전 중일 때 알고리즘은 모터의 정확한 같은 상태(위치, 듀티 싸이클, 회전방향)에서 시작할 것입니다.


  • I have also used some hack-ish conditions based on trial and error to improve the startup. 

  • 저는 startup을 개선하기 위해서 시행착오에 근거한 일종의 hack-ish 조건들을 또한 사용하였습니다.


  • Closed loop operation is used from the first commutation, since the measured values are clean enough when using these techniques. 

  • 폐루프 동작은 처음 commutation부터 사용되었는데 이는 이 기술들을 사용할 때 측정된 값이 충분히 깨끗하기 때문입니다.


다음 비디오는 이것이 어떻게 scorpion outrunner와 electric longboard에서 동작하는지를 보여줍니다:



Some examples with plots

** 모든 플롯은 모터 제어기에서 캡춰한 전압 샘플이고, 이는 PWM 타이머에 동기화되었습니다. 이것은 스위칭이 신호를 왜곡하기 때문에 오실로스코프 상에서 다르게 보일 수 있습니다. **


이것은 상전압이 전형적인 startup 시쿼스에 대해서 어떻게 보이는지를 보여줍니다. 여기서 듀티 싸이클을 5%로 설정되었습니다:



Even though the duty cycle is only 5%, the waveform is clean. This is because the switching frequency is low at this speed and the on-time is long enough to get good samples. The first commutation is a bit off at first since the motor is not perfectly aligned, but the second commutation already looks perfect. 

듀티 싸이클이 5%일지라도 파형은 깨끗합니다. 이는 스위칭 주파수가 이 속도에서는 낮고 ON 타임이 좋은 샘플을 얻기 위해서 충분히 길기 때문입니다. 처음 commutation은 모터가 완전하게 정렬되지 않았기 때문에 약간 벗어나지만 두번째 commutation은 이미 완벽하게 보입니다.


Here is another example with 35% duty cycle:

35% 듀티 싸이클의 또 다른 예입니다:



And this is the measured current for the same startup:

그리고 다음은 같은 startup에 대해서 측정된 전류입니다:



Here the phase voltage has some commutation spikes in the beginning because the current is quite high during acceleration, but even so the commutations are even and clean. 

여기에 상전압은 초기에 commtation spike를 갖습니다. 왜냐하면 전류는 가속동안에 매우 높기 때문입니다. 그러나 그렇다 하더라도 commutation은 고르고 깨끗합니다.


Here is an example where the duty cycle is ramped towards 100% rapidly:

다음은 듀티 싸이클이 100%까지 급하게 상승할 때의 예입니다:



Again, because of the current, there are commutation spikes on the voltage. The voltage from my lab power supply is also dropping because of the load. Even so, the commutations are even and clean. 

다시 전류로 인해서 전압 상에 commutation spike가 존재합니다. 제 전원공급기로부터 전압은 부하로 인하여 또한 떨어졌습니다. 그렇다 하더라도 commutation은 고르고 깨끗합니다.


Here is one unusual case, for which I had to restart the motor 20 or 30 times to get it captured:

다음은 캡쳐하기 위해서 모터를 20 혹은 30회 다시 시작한 경우의 비정상적인 경우입니다:



The first commutation happens to be exactly at a position where no torque is produced, which is as sub-optimal as it can get. On the current waveform, it can be seen that the current limit of 60A is applied. After 40 millisecond, the algorithm decides that nothing has happened for a too long time and adds an auto-commutation. After this, the motor is tracked right away and the commutations are nice and even. This works even though the motor was stalled with 60A for a while. 

처음 commutation은 어떠한 토크도 만들지 않는 위치에 정확히 발생하고 이것은 얻을 수 있는 차선책입니다. 전류 파형 상에서 60A의 전류 제한이 보여집니다. 40ms 후에 알고리즘은 어떠한 것도 너무 긴 시간에 일어나지 않았고 auto-commutation을 추가하기로 결정합니다. 이후에 모터는 즉시 추적되고 commutation은 훌륭하고 고르게 나타났습니다. 이것은 모터가 잠시 동안 60A로 실속한 경우 조차에서도 동작하였습니다.


Here is one example where I start the motor, switch off power after a few commutations and then switch on power again:

다음은 모터를 startup 하고 수 commutation 후에 전원을 크고 그리고 다시 전원을 켠 예입니다:


 

It can be seen that the un-driven back-emf is tracked perfectly while the power is gone and no commutation is missed or distorted during the transitions. 

전원이 커진 동안 구동되지 않은 BEMF가 완전하게 추적되고 어떠한 commutation도 놓치거나 천이 동안에 왜곡되지 않았음을 볼 수 있습니다.


Results

The electric longboard I have been working on starts perfectly smooth without sensors (see the video above).

제가 작업한 electric longboard는 startup 상에서 센서 없이 완벽하게 부드럽습니다(see the video above). 


I have also tested this on a 700w hub motor on an electric bicycle with extremely good results. Full throttle from a complete stop is smooth and no problem at all. I don’t miss hall sensors here one bit. 

저는 또한 전기 자전거인 700w hub 모터에서도 시험하였고 매우 우수한 결과를 얻었습니다. 완전한 정지로부터 full 스로틀까지 부드럽고 전혀 문제가 없었습니다. 저는 여기서 조금도 홀 센서를 그리워하지 않습니다.



Posted by Nature & Life


다음의 GitHub에서 bldc-tool의 소스 코드를 다운로드 합니다.

https://github.com/vedderb/bldc-tool


다음의 Qt 홈페이지에서 Qt 프로그램을 받기 위해서는 다음의 링크에서 'Get your open source package' 버튼을 클릭하여 installer 프로그램을 우선 다운로드 받아 실행시켜야 합니다.

Qt 다운로드


위 installer는 Qt 설치를 위해 필요한 콤포넌트를 설정하고 온라인으로 해당 패키지를 다운로드 하기 위한 프로그램으로 자신의 OS를 감지하여 받게 됩니다. 진행하다 보면 다운로드 하기 위한 콤포넌트를 설정하는 화면에서 아래와 같이 설정하고 진행하면 됩니다.



위 설정에서 버젼은 다른 버젼을 사용해도 무방할 것으로 생각되지만 필자는 용량의 이유로 위와 같은 컴포넌트만을 받기로 하였습니다. 필자는 Windows 10(32-bit) 환경입니다. 여기서 MinGW라는 것이 있는데 Qt는 cross platform으로 OS에 무관하며 컴파일러(예를 들어 g++, gdb, make) 등을 Linux 정신에 맞게 GNU를 사용합니다. 이를 Windows 환경에서도 사용할 수 있도록 만든 것이 MinGW이고 'Minimalist GNU for Windows'의 약자입니다. 참고로 64bit라 하여도 위 설정에서처럼 32bit를 사용해야 하며 반드시 설치하여야 합니다.


설치 후 Qt Creator를 실행시키고 메인 화면에서 'Open Project'를 클릭하여 다운로드 한 bldc-tool 폴더 내에 'BLDC_Tool.pro'를 선택하여 로드합니다. 다음은 'Tools' 메뉴에 'Options' 메뉴를 클릭합니다. 좌측 메뉴에서 'Build & Run'을 클릭하고 우측에서 'Qt versions', 'Compilers', 'Debuggers'를 아래와 같이 순차적으로 수정합니다.



위 화면에서와 같이 Qt와 MinGW가 정상적으로 설치되었다면 자동 감지(Auto-detected)되지만 그렇지 않은 경우 'Add' 메뉴로 일일이 각각 설정해 주어야 합니다. 그리고 위 화면에서 'Kits' 탭으로 이동하면 다음과 같은 화면을 볼 수 있습니다.



모든 것이 정상적이면 위와 같이 설정되고 그렇지 않으면 각 항에서 'Manage' 버튼으로 직접 수정해 주어야 합니다. 마지막으로 로드된 프로젝트 메인 화면 좌측 'Projects'를 클릭하고 빌드시 생성되는 파일들의 위치 정도를 설정해 주면 됩니다.



메인 화면의 'Build' 메뉴에서 빌드('Build All')하면 debug 폴터에 BLDC-Tool.exe 실행파일이 생성되고 'Build' 메뉴의 'Run'으로 실행시키면 됩니다. debug 폴더에서 실행 파일을 직접 클릭하여 실행시킬 수도 있는데 이 경우에는 *.dll 파일이 없다는 오류가 발생하는데 이는 정적(static)으로 빌드하였기 때문으로 배포시에 동적(dynamic) 빌드하면 해결됩니다.



Posted by Nature & Life


VESC 하드웨어(v4.8)의 회로도 입니다.

https://github.com/vedderb/bldc-hardware






Posted by Nature & Life


비교적 무거운 환경인 ChibiStudio 혹은 Eclipse IDE나 제한이 많은 Keil, IAR 등의 상용 IDE를 사용하지 않고 Windows 환경에서 무료로 사용할 수 있는 Embitz 환경으로, 오픈 소스 RTOS인 ChibiOS를 사용한 VESC 펌웨어의 컴파일 방법입니다. 참고로 Embitz는 emblocks의 새로운 이름입니다.


VESC firmware compile step for Embitz v1.11


VESC firmware : https://github.com/vedderb/bldc

Embitz : https://www.embitz.org/

Msys : http://downloads.sourceforge.net/mingw/MSYS-1.0.11.exe


1. Settings->Tools... , Toolchain executables , additional paths.

- enter path to Msys/bin

1. 'Tools' 메뉴의 'Toolchain executables' 탭을 클릭하고 'additional paths' 눌러 Msys/bin 경로를 찾아 추가합니다. 여기서 Msys를 설치하지 않으며 'make.exe'파일을 이용할 수 없게 됩니다.


2. Create new project.

- choose Empty template

- name project title as 'BLDC_4_ChibiOS', will make things easier.

- untick debug checkbox

- change create release configuration to 'upload'

- change ouput dir to 'build\'

- change objects output dir to 'build\obj\'

2. 'new project'를 생성합니다.

- 'Empty template' 를 선택합니다

- 'project title'을 'BLDC_4_ChibiOS'으로 입력하는데 이는 makefile에 이미 정의된 것으로 후에 생길 오류들을 없애기 위함입니다.

- 'debug checkbox'를 체크 해제합니다

- 'release'대신 'upload' 폴더로 생성하도록 'release'를 'upload'로 변경합니다

- 'output dir'를 'build\'로 변경합니다

- 'objects output dir'를 'build\obj\'로 변경합니다


3. copy all files from bldc-master to BLDC_4_ChibiOS

3. github에서 다운로드하여 압축해제 한 'bldc-master' 폴더 내에 모든 파일을 새롭게 생성된 'BLDC_4_ChibiOS' 폴더 안으로 복사합니다


4. right click on your project choose 'add files recursivly'

- choose folder 'BLDC_4_ChibiOS'

4. project를 오른쪽 클릭하여 'add files recursivly'를 선택합니다.

- 'BLDC_4_ChibiOS' 폴더를 선택합니다


5. right click on your project choose 'properties'

- check checkbox 'this is a custom Makefile'

5. project를 오른쪽 클릭하여 'properties'를 선택합니다.

- 'this is a custom Makefile'의 체크 박스를 체크합니다. 즉 기존의 makefile를 사용함을 의미합니다.


6. Build target

6. Build target을 클릭하여 컴파일 합니다.


7. Clean target을 클릭하여 생성된 파일을 삭제할 수 있는데 삭제되지 않으면, 'Project'의 'Build options' 메뉴를 클릭하여 '"Make commands' 탭을 선택하고 'Clean project/target'란 '$make -f $makefile clean $target'라는 정보가 올바로 입력되어 있는지 확인합니다.


during build there is no response or status.

컴파일하는 동안에 어떤 응답이나 상태를 보이지는 않습니다.


제 경우에는 15분 26초 정도 걸렸습니다.

Intel Atom CPU Z3735F @1.33GHz / 2GB 메모리 / Windows 10 Home(32bit)



VESC는 Unix 환경에서 작성되어 비록 Windows 환경에서 Embitz IDE를 사용하더라도 Compile과 Link에 사용되는 Toolchain과 Makefile을 사용하기 때문에 Unix 기반의 'make.exe', 'rm.exe' 등이 포함된 [Msys와 같은] Build 유틸이 설치되어야 합니다. GNU ARM Embedded Toolchain과 Debugger로는 오픈 소스인 OpenOCD를 사용합니다.



'Flight Controller 이해 > 전자속도제어기(ESC)' 카테고리의 다른 글

Qt에서 bldc-tool 컴파일 방법  (0) 2017.12.24
VESC 하드웨어(v4.8) 회로도  (0) 2017.12.21
VESC - Open Source ESC(4)  (0) 2017.11.09
VESC - Open Source ESC(3)  (0) 2017.11.04
VESC - Open Source ESC(2)  (0) 2017.11.04
Posted by Nature & Life


Software Installation and Configuration Tutorial


This a brief tutorial on how to get everything running using a fresh install of Ubuntu 14.04. Here is a video where I do everything live to demonstrate that it isn’t that difficult. Please read all the instructions carefully to avoid most problems.

이는 Ubuntu 14.04를 설치하여 모든 것이 어떻게 가능하게 하는지에 대한 주요 설명서입니다. 여기 비디오는 이것이 그렇게 어렵지 않다는 것을 보여주는 영상입니다. 대부분의 문제들을 피하기 위하여 모든 설명을 주의깊게 읽어보시기 바랍니다.



So let’s open up a terminal and get started...


PREPARATIONS

Install a toolchain to compile the firmware (for more details, have a look at this page):

펌웨어를 컴파일하기 위해서 toolchain을 설치합니다(자세한 정보는 여기를 참조하기 바랍니다):


sudo apt-get remove binutils-arm-none-eabi gcc-arm-none-eabi

sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded

sudo apt-get update

sudo apt-get install gcc-arm-none-eabi=4.9.3.2015q3-1trusty1


Install other dependencies

다른 dependency들도 설치합니다.


sudo apt-get install build-essential qt-sdk openocd git libudev-dev libqt5serialport5-dev


Add yourself to the dialout group to access the USB port of the ESC without being root:

root가 되지 않아도 ESC의 USB 포트에 접근하기 위해서 여러분을 dialout에 추가합니다.


sudo adduser $USER dialout


Uninstall modemmanager (unless you use it) to avoid a delay every time the ESC is plugged in to the USB port:

ESC가 USB 포트에 연결될때마다 delay를 피하기 위해서 (여러분이 이를 사용하지 않는 한) 모뎀매니저를 제거합니다:


sudo apt-get remove modemmanager


Add udev rules to access the programmer without being root:

root가 되지 않아도 프로그래머에 접근하기 위해서 udev rule를 추가합니다:


wget vedder.se/Temp/49-stlinkv2.rules

sudo mv 49-stlinkv2.rules /etc/udev/rules.d/

sudo reload udev


Log out and log back in. You should now be ready to compile the firmware, upload the firmware, compile BLDC Tool and run BLDC tool.

로그아웃 후 다시 로그인합니다. 여러분은 이제 펌웨어를 컴파일하고 펌웨어를 업로드하고, BLDC 툴을 컴파일하고 BLDC 툴을 실행시킬 수 있습니다.


DOWNLOAD, COMPILE AND UPLOAD THE FIRMWARE

First, connect a programmer as described in this post. Then, download the latest firmware from github, compile and upload it:

우선, 이 글에서 묘사된 것처럼 프로그래머를 연결합니다. 그리고 나서 github으로부터 가장 최근 펌웨어를 다운로드, 컴파일하고 업로드합니다:


mkdir BLDC

cd BLDC

git clone https://github.com/vedderb/bldc.git bldc-firmware

cd bldc-firmware

make upload

cd ..


Note: before running the make upload command, you should open conf_general.h and select which hardware version you are using. It is printed on the PCB. Also, 2015-01-22 I changed the voltage divider resistors to allow up to 60V to be measured by the ADC, so in that case you also have to override VIN_R1 to 39000.0 in conf_general.h.

Note: 'make upload' 명령을 실행시키기 전에 여러분은 conf_general.h을 열고 여러분이 사용하는 하드웨어 버젼을 선택해야 합니다. 이는 PCB 상에 쓰여있습니다. 또한 2015.1.22에 저는 ADC에서 60V까지 측정되기 위해서 voltage divider 저항들을 변경하였습니다. 그래서 이 경우에 conf_general.h에 VIN_R1을 39000.0로 덥어써야 합니다.


DOWNLOAD, COMPILE AND UPLOAD THE BOOTLOADER

Again, connect a programmer as described in this post. Then, download the latest bootloader from github, compile and upload it:

다시 이 글에서 묘사된 것처럼 프로그래머를 연결합니다. 그리고 나서 github으로부터 가장 최근 부트로더를 다운로드, 컴파일하고 업로드합니다:


mkdir BLDC

cd BLDC

git clone https://github.com/vedderb/bldc-bootloader.git bldc-bootloader

cd bldc-bootloader

make upload

cd ..


With the bootloader, BLDC Tool can be used to upgrade the firmware later.

부트로더를 이용하면 BLDC 툴로 펌웨어를 나중에 업그레이드 할 수 있습니다.


DOWNLOAD, COMPILE AND START BLDC TOOL

From the BLDC directory that you created in the previous step, type:

이전 단계에서 생성된 BLDC 폴더로부터 다음을 입력하세요:


git clone https://github.com/vedderb/bldc-tool.git bldc-tool

cd bldc-tool

qmake -qt=qt5

make

./BLDC_Tool


You should see the following screen:

여러분은 다음 화면이 보여야 합니다:



Connect the ESC to the USB port of your computer and click “Connect” in BLDC Tool. The lower right corner should now say “Connected”. If you have gotten this far, you should be ready to connect a motor and configure the ESC from BLDC Tool.

여러분 컴퓨터의 USB 포트에 ESC를 연결하고 BLDC 툴에 "Connect"를 클릭합니다. 우측하단 코너에 지금 "Connected"가 보여야 합니다. 만일 여러분이 여기에 도달했다면 여러분은 모터를 연결하고 BLDC 툴로부터 ESC를 셋팅할 준비가 된 것입니다.


Note: If you have more than one usb-modem device in your computer (laptops often have built-in 3g modems), then you have to change ttyACM0 to the port of the ESC. To figure out which ttyACMx port the ESC got, open a terminal and type the following command right after plugging the USB cable in:

Note: 만일 여러분의 컴퓨터에 1개 이상의 USB 모뎀 장치를 갖고 있다면 (랩톱은 종종 빌트인 3g 모뎀을 갖고 있습니다), 여러분은 ESC의 포트를 ttyACM0로 변경해야 합니다. 어떤 ttyACMx 포트가 ESC와 연결되었는지를 찾기 위해서 USB 케이블을 꼽은 후에 터미널을 열고 다음의 명령어를 입력합니다.


dmesg | tail


BLDC Tool can also be started by going to the bldc-tool directory with a file browser and double-clicking on “BLDC_Tool”.

BLDC 툴은 브라우저로 bldc-tool 디렉토리로 이동하여 "BLDC_Tool"를 더블 클릭하는 것으로 시작할 수 있습니다.


UPDATING TO THE LATEST FIRMWARE

Updating to the latest firmware and the latest version of BLDC Tool is rather simple. From the bldc-firmware directory, type the following commands while the programming cable is connected to the ESC:

가장 최근 펌웨어와 BLDC 툴의 가장 최근 버전을 업데이트하는 것은 오히려 쉽습니다. bldc-firmware 디렉토리에서 프로그래밍 케이블이 ESC에 연결된 동안 다음의 명령어를 입력하세요:


git pull

make upload


Note: Updating the firmware will delete the configuration of the ESC. To save it from BLDC Tool, use the “Read configuration” button and then “Save XML”. After updating the firmware, you can restore it with “Load XML” and “Write configuration”.

Note: 펌웨어를 업데이트하는 것은 ESC의 설정을 삭제할 것입니다. 이를 BLDC 툴로부터 저장하기 위해서 "Read configuration"과 "Save XML" 버튼을 이용하세요. 펌웨어를 업데이트한 후에 여러분은 이를 "Load XML"과 "Write configuration"으로 다시 설정할 수 있습니다.


Also updating BLDC Tool is important and recommended at the same time as updating the firmware. In order to do that, go to the bldc-tool directory and type:

또한 BLDC 툴을 업데이트하는 것이 중요하며 펌웨어를 업데이트하는 같은 시점으로 추천합니다. 이를 위해서 bldc-tool 디렉토리로 이동하여 다음을 입력합니다:

 

git pull

qmake

make


Now you have the latest version of the firmware and BLDC Tool. Remember to reconfigure the ESC after these changes.

이제 여러분은 가장 최신의 펌웨어와 BLDC 툴을 소유하였습니다. 이들 변경 후에 ESC를 재설정해야 함을 기억하세요.



Posted by Nature & Life


Hardware


The PCB is designed using KiCad. Have a look at the links under the Resources heading at the top of this page to find all files. Currently I have no assembled PCBs or kits to sell, but you can order bare PCBs from hackvana with these gerber files. Since hackvana got so many orders for my ESC, Mitch wrote a wiki page about how to order VESC boards from him. That makes it super easy to order the PCBs from him.

PCB는 KiCad를 이용해서 설계되었습니다. 모든 파일들을 보기 위해서 이전 글의 'Resources' 링크를 참조하시기 바랍니다. 현재 저는 조립되지 않은 PCB나 판매를 위한 키트를 갖고 있지 않습니다. 이 gerber 파일들을 이용해서 hackvana로부터 주문할 수 있습니다. hackana는 저의 ESC에 대한 매우 많은 주문을 받고 있기 때문에 Mitch는 그로부터 VESC 보드를 어떻게 주문하는지에 대하여 wiki page를 작성하였습니다. 이는 그로부터 PCB를 주문하는 것을 매우 쉽게 합니다.


The components in the BOM can be ordered from mouser.com. Mouser numbers are included in the BOM as well. Make sure to order a bit extra of small capacitors and resistors in case you drop some of them and since the price doesn’t change much at all. Last I ordered, ordering 10 MOSFETs was cheaper than ordering 6 because there is a price break at 10, so have a look at the price breaks as well.

BOM에서 부품들은 mouser.com로부터 주문할 수 있습니다. 게다가 Mouser 번호들은 BOM에 포함되어 있습니다. 경우에 따라서 여분의 작은 커패시터나 저항들을 주문하세요. 이는 여러분이 일부 부품을 잃어버릴 수도 있고 가격이 크게 변하지 않지 때문입니다. 제가 마지막으로 주문했을때 10개의 MOSFET을 주문하는 것이 6개를 주문하는 것보다 저렴하였습니다. 왜냐면 10개에서 가격 할인이 있기 때문입니다.


For assembling the PCBs, the following pictures are useful (the latest versions can be found on github):

PCB의 조립을 위해서 다음의 그림이 유용합니다(최근 버젼은 github에서 찾을 수 있습니다):



Remember to put an electrolytic capacitor close to the ESC on the supply cable. How large it has to be depends on the length and inductance of the battery cables, but I usually use a 2200uF 63V capacitor.

전해 커패시터는 전원 케이블 상의 ESC에 가깝게 위치해야 함을 기억하세요. 이는 밧데리 케이블의 길이와 인덕턴스에 크게 의존합니다. 그러나 저는 보통 2200uF 63V 커패시터를 사용합니다.


SOLDERING TIPS

This is the best tutorial I have seen so far. It really is as easy as it looks when done right.


    • Flux is essential. Without flux, it won’t work. I use a flux pen.

    • Lead-free solder is no good. It has more poisonous flux, requires more heat, gives lower quality and is difficult to handle. Don’t use lead-free solder.

    • Use a flat, screwdriver-shaped tip. Don’t use a cone tip, because putting solder on the top of it is almost impossible.

    • If you get bridges between smd pins, removing them is easy with a soldering wick.

    • Make sure to get the alignment right for the microcontroller when soldering the first corner. If you solder multiple corners and the chip is misaligned, you have to use hot air and remove it, then clean the pads and start over.


Here is a video on the technique I use to solder the pad under the DRV8302:


I just put solder on the pad and use a hot air soldering station. Again, using leaded solder makes it easier. When soldering the DRV8302, I first solder the pad using hot air and then I solder the pins with a soldering iron. Notice that the pad under the DRV8302 must be connected for it to work, since it is the ground connection.

패드 위에 solder을 놓고 hot air soldering station를 사용합니다. 납이 함유된 solder가 더 쉽습니다. DRV8302를 납땜할 때 저는 우선 hot air를 사용하여 패드를 땜질하고 나서 인두기로 핀들을 땜질합니다. DRV8302 밑에 패드는 작업하는 동안 연결되어야만 합니다. 이는 접지이기 때문입니다.


VESC Hardware by Benjamin Vedder is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.



Posted by Nature & Life


The is the ESC mounted on my electric longboard:


Sensorless startup and low-speed performance:


A short tutorial/demonstration on how to upload the firmware and get your motor running:


My electric longboard:


Video overlay logging (see a post about that here):


Posted by Nature & Life


출처 : By Benjamin Vedder

http://vedder.se/2015/01/vesc-open-source-esc/

http://vesc-project.com/

https://github.com/vedderb/bldc(bldc 펌웨어 설계) : 모든 하드웨어 버젼에 사용

https://github.com/vedderb/bldc-hardware(bldc 하드웨어 설계) : v4.12까지

http://vesc-project.com/node/311(bldc 하드웨어 설계) : v6.4부터

https://github.com/vedderb/bldc-tool(bldc-tool 설계) : v2.18까지

https://github.com/vedderb/vesc_tool(vesc-tool 설계, bldc-tool의 새로운 버젼)

https://github.com/vedderb/bldc-logger(bldc-logger 설계)

https://github.com/vedderb(기타 프로젝터 설계)


VESC – Open Source ESC

Posted on January 7, 2015 and Post updated 2016-01-22


About this project

I have made many updates to my custom motor controller recently and the old post is getting confusing with notes and updates, I decided to write a new post about it that hopefully is more clear, more complete and easier to follow. This might sound a bit ambitions, but my goal is to make the best ESC available. I really enjoy sharing knowledge, so I want to keep all the hardware and software open.

저는 최근에 제 모터 제어기에 많은 개선을 해왔습니다 그리고 이전에 게시된 내용은 설명과 업데이트에서 혼선을 일의키고 있고, 저는 좀더 분명하고 좀더 완전하며 좀더 이해하기 쉽게 하기 위해서 새로운 게시글을 작성하기로 하였습니다. 이는 약간 애매할 수도 있지만 저의 분명한 목표는 가장 좋은 ESC를 만드는 것입니다. 저는 사실 지식을 공유하는 것을 즐깁니다. 따라서 저는 모든 하드웨어와 소프트웨어를 공개하기를 원합니다.


This is an overview of the schematic (download a complete PDF here):


This is the front of the PCB:


The back:


3D render from KiCad:


Some screenshots of the configuration GUI (BLDC Tool):


Resources

All files are on github to keep them up to date, so check these links on a regular basis:


Related posts


Forums

Because information about the VESC is scattered all over the internet and a lot of information is in email conversations with me, I have created a forum dedicated to the VESC here.

VESC에 대한 정보는 인터넷 상에서 퍼져있기 때문에 많은 정보는 저와 이메일로 대화합니다. 저는 여기에 VESC에 대한 포럼을 만들었습니다.


Live Chat

I have created an IRC channel on freenode where you can live chat with me and other users about VESC and my other projects. Feel free to join: http://webchat.freenode.net/?channels=vedder


Features

    • 하드웨어와 소프트웨어는 오픈소스입니다. 다양한 CPU 리소스가 남았기 때문에 사용자 최적화는 무한합니다.

    • STM32F4 microcontroller.

    • DRV8302 MOSFET driver / buck converter / current shunt amplifier.

    • IRFS7530 MOEFETs (other FETs in the same package also fit).

    • DRV8302에 집적화된 buck converter로부터 외부 전자장치를 위한 5V 1A 출력.

    • Voltage: 8V – 60V (Safe for 3S to 12S LiPo).

    • Current: 수 초동안 250A까지 혹은 온도와 PCB 주변에 공기 순환에 의존하여 연속적인 약 50A.

    • Sensored and sensorless FOC wich auto-detection of all motor parameters is implemented since FW 2.3.

    • Firmware based on ChibiOS/RT.

    • PCB size: slightly less than 40mm x 60mm.

    • Current and voltage measurement on all phases.

    • Regenerative braking.

    • DC motors are also supported.

    • Sensored or sensorless operation.

    • A GUI with lots of configuration parameters.

    • Adaptive PWM frequency to get as good ADC measurements as possible.

    • RPM-based phase advance (or timing/field weakening).

    • Good start-up torque in the sensorless mode (and obviously in the sensored mode as well).

    • The motor is used as a tachometer, which is good for odometry on modified RC cars.

    • Duty-cycle control(voltage control), speed control or current control.

    • Seamless 4-quadrant operation.

    • Interface to control the motor: PPM signal (RC servo), analog, UART, I2C, USB  or CAN-bus.

    • Wireless wii nunchuk (Nyko Kama) control through the I2C port. This is convenient for electric skateboards.

    • Consumed and regenerated amp-hour and watt-hour counting.

    • Optional PPM signal output. Useful when e.g. controlling an RC car from a raspberry pi or an android device.

    • USB포트는 모뎀 프로파일을 사용합니다. 그래서 안드로이드 디바이스는 루팅 없이 모터 제어기에 연결할 수 있습니다. 서보 출력, 주행거리계(odometry) 그리고 여분의 ADC 입력(센서를 위하여 사용될 수 있슴) 때문에 이것은 안드로이드( 혹은 raspberry pi)로 제어되는 RC 카를 개조하기에 완벽합니다.

    • Adjustable protection against

        • Low input voltage

        • High input voltage

        • High motor current

        • High input current

        • High regenerative braking current (separate limits for the motor and the input)

        • Rapid duty cycle changes (ramping)

        • High RPM (separate limits for each direction).

    • 전류 한계에 도달했을 때 모터가 동작을 유지하면서 soft back-off 전략이 사용됩니다. 만일 전류가 너무 높다면, 모터는 완전하게 OFF 됩니다.

    • RPM limit은 또한 soft back-off 전략을 갖습니다.

    • Commutation은 모터 속도가 급격하게 변동할 때 조차도 완벽하게 동작합니다. 이는 이전 속도에 근거하여 지연을 추가하는 것 대신에 zero crossing 후에 자속을 적분한다는 사실 때문입니다. 

    • 제어기가 커진 동안에 모터가 회전할 때 commutation과 회전방향은 추적됩니다. 같은 속도를 얻기 위해서 듀티 싸이클이 또한 계산됩니다. 이는 모터가 이미 회전중일 때 부드러운 출발을 얻게 합니다. 

    • 모든 하드웨어는 센서 없는 자속 기준 제어(field-oriented control; FOC)를 위해서 준비되었습니다. 소프트웨어를 작성하는 것이 남아있습니다. 그러나 저는 FOC가 조금 정숙하게 동작한다는 것 외에 저 인덕턱스 고속 모터에 대하여 많은 이득을 갖는 것인지 아닌지 확신하지 못합니다. 센서 그리고 센서 없는 FOC는 FW 2.3 이후에 완전하게 구현되었습니다.



Posted by Nature & Life