cvl-robot's diary

研究ノート メモメモ https://github.com/dotchang/

特性の分からない3相DCブラシレスモーターをソフトウェアエンコーダを搭載したTiのマイコンボードLAUNCHXL-F28069MとモータドライバBOOSTXL-DRV8305EVMを使って動かす(その3)

Tiの製品はドキュメントが多いのはいいのですが、煩雑であまり整理されているようには見えません。
また、独自用語や独自製品名、独自技術名に変な名前を付けるのが好きで、ある程度一般的な技術知識を持ってる人が見ても、ちんぷんかんぷんな言葉が散見されます。
さらに、日本語訳されているドキュメントもあるにはあるのですが、途中で力尽きたのか触りの部分だけ翻訳されていたり、古いままだったりします。
なので、読むときには必ず英語ドキュメントと見比べるなど注意が必要です。

ここでは、資料と用語の簡単なまとめをしておきたいと思います。

資料の入手先

1. MotorWare

www.tij.co.jp
最初にこれをインストールします。
exe形式のアプリケーションなのですが、実態は技術資料のリンク集と、マイコンやインバータボード毎にまとめられたソフトウェアdriverやexampleのソースコード集です。
まず、これをインストールしておけば、だいたいの資料へのポインタはわかるようになります。
標準のインストール先は、c:\ti\motorwareの下になります。

*1

ちなみに、Motorwareと同様にTiのマイコン一般用のリソースをまとめたControlSuiteというアプリがありますが、モーター制御を主眼に置いて使用するなら不要です。シリアル通信のソースコードを参照する等、参考程度に使用してください。

起動すると、このようなリストが出ます。
f:id:cvl-robot:20161007151012p:plain

開発環境のインストール

最初にするべきことは、一番下のCCSのダウンロードとインストールです。
CCSはCode Composer Studioの略で、EclipseベースのTi C2000マイコン用の開発IDEです。
有料版と無料版がありますが、無料版でOKです。
ダウンロードには、ユーザー登録と用途の申請が必要になります。
こちらも標準のインストール先は、c:\tiの下になります。

開発資料の確認

MotorwareのResourcesを展開すると、
f:id:cvl-robot:20161007151720p:plain
このようなリストが出てきます。
見るべきところをさらに展開すると、
f:id:cvl-robot:20161007151940p:plain
このようになります。
マイコンボードF28069Mのハードウェアに関する情報と、
・インバータDRVV8305EVMについてのハードウェア情報と、
・Tiのマイコンシリーズ共通の技術情報、
・ユーザーガイドやチュートリアル
です。

2. C2000 Piccoloシリーズの開発入門

http://www.tij.co.jp/jp/lit/an/jaja230a/jaja230a.pdf
日本語で書かれた有用な資料ですが、翻訳が古く現在のバージョンでは致命的な問題がありますので、4章は絶対に読まないでください。
現在のバージョンでは、Flashへの書き込みはCCSの上だけでExampleのソース変更も不要でもっと簡単にできるようになっています。

固定小数点

c2000シリーズの多くは浮動小数点演算機能を持たず、あまり使い慣れない固定小数点で計算する必要があります。
IQmathライブラリという名前の固有小数点演算ライブラリが提供されており、一手間多くはなりますが慣れれば普通に計算できるようになります。

ADC

多チャンネルの入力を切り替えて使うタイプのADCで、タイミングや順序など細かい設定をプログラミングできるようになっています。
しかし、使い慣れない感じのAPIなので資料を読んでおくと有益です。

SCI(UART)

RS232で知られるいわゆるUARTシリアル接続は、TIのマイコンではSCIと呼ばれます。
これも少し煩雑なので、読んでおいた方が良いです。

用語のメモ

TRM(Technical Reference Manual)のSoftware Architectureの最初の方に記述があります。

APIApplication Programming Interface
ACIM – Alternating Current Induction Motor
ADC – Analog-to-Digital Converter
ePWM – Enhanced Pulse Width Modular
FIFO – First In, First Out
GUI – Graphical User Interface
HAL – Hardware Abstraction Layer
IDE – Integrated Development Environment
ISR – Interrupt Service Routine
MCU – Micro-Controller Unit
PIE – Peripheral Interrupt Expansion
PWM – Pulse Width Modulation
PMSM – Permanent Magnet Synchronous Motor
RAM – Random Access Memory
ROM – Read Only Memory
RTOS – Real Time Operating System
SOC – Start Of Conversion

Piccolo F2806xM InstaSPIN-MOTION TRMの54ページに記述があります。

ACIM — Alternating current induction motor. (交流誘導電動機, 交流誘導モーター)
ADRC — Active Disturbance Rejection Control. (自動外乱排除制御) Estimates and compensates for system disturbance, in real-time. (実時間での、システム外乱の推定と補償)
CCStudio — Code Composer Studio. (コードコンポーザースタジオ、開発環境)
FAST — Unified observer structure which exploits the similarities between all motors that use magnetic flux for energy transduction (磁束エネルギー伝達を使うすべてのモータの類似性を利用した統一オブザーバ機構), automatically identifying required motor parameters and providing the following motor feedback signals: (必要なモータパラメータの自動推定と以下のモーターフィードバック信号)
• High-quality Flux signal for stable flux monitoring and field weakening. (安定な磁束観測と弱め界磁のための高品質な磁束信号)
• Superior rotor flux Angle estimation accuracy over wider speed range compared to traditional observer techniques independent of all rotor parameters for ACIM.
• Real-time low-noise motor shaft Speed signal.
• Accurate high bandwidth Torque signal for load monitoring and imbalance detection.
FOC — Field-oriented control.
Forced-Angle — Used for 100% torque at start-up until the FAST rotor flux angle tracker converges within first electrical cycle.
InstaSPIN-FOC — Complete sensorless FOC solution provided by TI on-chip in ROM on select devices (FAST observer, FOC, speed and current loops), efficiently controlling your motor without the use of any mechanical rotor sensors.
InstaSPIN-MOTION — A comprehensive motor-, motion- and speed-control software solution that delivers robust system performance at the highest efficiency for motor applications that operate in various motion state transitions. InstaSPIN-MOTION builds on and includes InstaSPIN-FOC, combined with SpinTAC™ Motion Control Suite from LineStream Technologies.
IPM — Interior permanent magnet motor.
LineStream Technologies — Pioneers in the world of embedded controls software. Boasting a team of motor control experts from six different countries cumulatively speaking fifteen languages and possessing over eighty years of industry experience, LineStream is fast becoming the world's preeminent stronghold of embedded motor control knowledge.
Motor Parameters ID or Motor Identification — A feature added to InstaSPIN-FOC, providing a tool to the user so that there is no barrier between running a motor to its highest performance even though the motor parameters are unknown.
PI — Proportional-integral regulator.
PMSM — Permanent magnet synchronous motor.
PowerWarp™ — Mode of operation used for AC induction motors (ACIM) that allows minimum current consumption.
Rs-Offline Recalibration — InstaSPIN-FOC feature that is used to recalibrate the stator resistance, Rs, when the motor is not running.
Rs-Online Recalibration — InstaSPIN-FOC feature that is used to recalibrate the stator resistance, Rs, while the motor is running in closed loop.
SpinTAC™ Motion Control Suite — Includes and advanced speed controller, a motion engine, and a motion sequence planner. The SpinTAC disturbance-rejecting speed controller proactively estimates and compensates for system disturbances in real-time, improving overall product performance. The SpinTAC motion engine calculates the ideal reference signal (with feed forward) based on user-defined parameters. SpinTAC supports standard industry curves, and LineStream’s proprietary "smooth trajectory" curve. The SpinTAC motion sequence planner operates userdefined state transition maps, making it easy to design complex motion sequences.
SVM — Space-vector modulation. (空間ベクトル変調)

あ、別にTiの製品の売り込みをしたいわけではないので、このページは機能や利点の紹介はしません。
自分で使うのに必要な情報を整理していきたいだけです。

今日の沼津漫画

GTRomanをはじめとする西風先生の漫画全般、おおよそ全部沼津です。愛にあふれていて超オススメ。ドラマ化されないかなー。
旧版 

GTロマン 1 (ヤングジャンプコミックス)

GTロマン 1 (ヤングジャンプコミックス)

完全版 
西風special selection GT roman完全版 1 (SPコミックス)

西風special selection GT roman完全版 1 (SPコミックス)

Kindle版 
GT Roman(1)

GT Roman(1)

ストラダーレムック版 
GT roman STRADALE 1 (GTロマン ストラダーレ 1) (Motor Magazine Mook)

GT roman STRADALE 1 (GTロマン ストラダーレ 1) (Motor Magazine Mook)

ストラダーレコミック版 
GT roman STRADALE SPECIALE (SPコミックス)

GT roman STRADALE SPECIALE (SPコミックス)

全部買うと良いです。

夏草冬涛 (上) (新潮文庫)

夏草冬涛 (上) (新潮文庫)

夏草冬涛 (下) (新潮文庫)

夏草冬涛 (下) (新潮文庫)

*1:英語のページでは、MotorWare™ is a cohesive set of software and technical resources for developing InstaSPI-FOC™ and InstaSPIN-MOTION™ based applications.これを直訳すると「モータウェアはInstaSPIN-FOCとInstaSPIN-MOTIONに基づくアプリケーションを開発するためのソフトウェアと技術資料をまとめたセットです。」と、ちゃんと書いてあるのですが、Tiの日本語のページには、「Piccolo InstaSPIN-FOC ソフトウェア・ィストリビューションは、C 言語、オブジェクト指向で、かつ API ベースの新しいモーター制御ライブラリ(モジュール、ドライバ、システム例、資料)を使用することで、開発を容易に、評価を迅速に実行。」とあります。機械翻訳なのかよほど日本語ができないのか、一事が万事こんな感じで酷い。