JP4012013B2 - MOTOR CONTROL METHOD, MOTOR CONTROL DEVICE, ELECTRONIC DEVICE, AND RECORDING DEVICE - Google Patents

MOTOR CONTROL METHOD, MOTOR CONTROL DEVICE, ELECTRONIC DEVICE, AND RECORDING DEVICE Download PDF

Info

Publication number
JP4012013B2
JP4012013B2 JP2002247480A JP2002247480A JP4012013B2 JP 4012013 B2 JP4012013 B2 JP 4012013B2 JP 2002247480 A JP2002247480 A JP 2002247480A JP 2002247480 A JP2002247480 A JP 2002247480A JP 4012013 B2 JP4012013 B2 JP 4012013B2
Authority
JP
Japan
Prior art keywords
motor
speed
drive
profile
control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2002247480A
Other languages
Japanese (ja)
Other versions
JP2004088926A5 (en
JP2004088926A (en
Inventor
伸恒 小林
斎藤  弘幸
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2002247480A priority Critical patent/JP4012013B2/en
Publication of JP2004088926A publication Critical patent/JP2004088926A/en
Publication of JP2004088926A5 publication Critical patent/JP2004088926A5/ja
Application granted granted Critical
Publication of JP4012013B2 publication Critical patent/JP4012013B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J19/00Character- or line-spacing mechanisms
    • B41J19/18Character-spacing or back-spacing mechanisms; Carriage return or release devices therefor
    • B41J19/20Positive-feed character-spacing mechanisms
    • B41J19/202Drive control means for carriage movement

Landscapes

  • Control Of Electric Motors In General (AREA)
  • Control Of Direct Current Motors (AREA)
  • Handling Of Sheets (AREA)
  • Character Spaces And Line Spaces In Printers (AREA)
  • Control Of Position Or Direction (AREA)

Description

【0001】
【発明の属する技術分野】
本発明はモータの制御方法、モータの制御装置、電子機器及び記録装置に関し、特に、モータを動力源として使用して駆動対象物を移動する際の制御に関する。
【0002】
【従来の技術】
現在、様々な装置の動力源としてモータが使用されており、特にDCモータは、構造が簡単でメンテナンスが不要、回転ムラや振動が少ない、高速化や高精度な制御が可能であるなどの理由で、OA機器や家庭用電化製品などに数多く使用されている。
【0003】
近年、プリンタにおいては、一般民生用プリンタは家庭で使用される割合が高いため、画像品位の向上と共に、稼動音の低下が望まれている。稼働時に発生される騒音(ノイズ)としては、記録時に発生するものと機構部分の駆動時に発生するものとがあるが、記録時の騒音発生源の少ないインクジェット記録装置においては、機構部分の駆動時に発生する騒音を低下することとなる。
【0004】
インクジェット記録装置の主な機構部分としては、記録ヘッドの走査機構と記録媒体の搬送機構とがあるが、記録ヘッドの走査機構の駆動手段として、DCモータとリニアエンコーダを使用して低騒音化を実現している。今日では、これに加え、記録媒体の搬送機構の駆動手段としてもDCモータとロータリーエンコーダが採用される場合が増えている。
【0005】
低騒音化の観点からは、DCモータを採用することにより効果が期待できるが、記録媒体搬送の高精度化の観点からは、機械的精度に加え、より高度な位置制御が必要となる。
【0006】
DCモータの位置制御方法としては、基本的には目標となる位置にローラの回転(角度)が到達した時にモータの電源をOFFにして惰性で停止させる方法が一般的である。
【0007】
DCモータを使用した機構において停止位置の精度を確保するためには、停止前速度の低速化と停止前外乱トルクの排除、すなわち停止直前の低速運転の安定化が必要不可欠であり、充分に遅い一定速度となった状態でモータの電源をOFFすることにより、停止までの制定時間及び停止位置の精度を安定させることができる。
【0008】
このようなDCモータを使用した構成においては、高精度な制御を行うためにはトルク変動を極力減らすことが必要となる。
【0009】
大きな周期のトルク変動に関しては、一般的に知られているPID制御に代表されるフィードバック制御によって外乱トルクを排除できるため制御可能であるが、コギングに代表される小さな周期のトルク変動に対しては、制御対象であるモータ自身に起因するものであることと、高速駆動時には上記のフィードバック制御によって解決できる周波数を超えてしまうことがあることから、制御することが困難である。
【0010】
このDCモータのコギングによるトルク変動に関して、図1及び図2を参照して以下に説明する。
【0011】
図1は、DCモータを定速で駆動した場合の速度変動を簡略に示したグラフである。横軸は時間を、縦軸は速度を示している。1001はここで基準速度として想定する速度(V_x)で駆動したときの速度プロファイルを示しており、1002は基準速度の2倍(2*V_x)で駆動したときの速度プロファイル、1003は基準速度の8倍(8*V_x)で駆動したときの速度プロファイルをそれぞれ示している。
【0012】
ここで、該DCモータが動作原理に起因する必然的な特性として持っているモータ自身のコギングによりトルク変動が生じ、周期的な速度変動が発生する。この周期的な速度変動は、モータ自身の特性に起因するものであるので、常に一定の回転角度に対応した移動距離ごとに発生し、従って速度が速くなればなるほど、より高い周波数で発生する。
【0013】
図中●で示されている1004は、コギングによるトルク変動の影響で、モータ自身が高速で回転してしまう位相角に対応するポイントを示している。また、図中■で示されている1005は、コギングによるトルク変動の影響で、モータ自身が低速で回転してしまう位相角に対応するポイントを示している。
【0014】
このように、基準速度V_xの2倍の速度2*V_xで駆動すれば速度変動は2倍の周波数で発生し、8倍の速度8*V_xで駆動すれば速度変動は8倍の周波数で発生する。
【0015】
次に、コギングによるトルク変動が、実際の駆動において及ぼす影響について説明する。
【0016】
図2は、DCモータにおいて用いられる理想位置プロファイル追値制御、理想速度プロファイル追値制御を例にして、コギングによるトルク変動の及ぼす影響を説明するための図である。
【0017】
図2において、横軸は時間を示しており、縦軸2001は速度を、縦軸2002は位置を示している。
【0018】
2003は理想位置プロファイルを示しており、2004は理想位置に到達させるための理想速度プロファイルを示している。この理想速度プロファイル2004は4つの制御領域からなり、加速制御領域2011、定速制御領域2012、減速制御領域2013、位置決め制御領域2014により構成されている。
【0019】
2004の理想速度プロファイルにおいて、V_STARTは初速度であり、V_FLATは定速制御領域2012の速度を示している。また、V_APPROACHは位置決め制御領域の速度を示しており、V_PROMISEは位置決め精度を達成するために絶対に守られなければならない停止直前の最大速度を示している。v_stopは、現実の駆動を想定した場合における外乱によってあらゆる値に変化する現実の値としての停止直前速度である。
【0020】
V_APPROACHは、実際の駆動における速度変動を考慮して、いかなる速度変動が発生してもv_stopがV_PROMISEを超えることがないように充分に低い値に設定されることが要求される。
【0021】
ここで示した例においては、後述するように、2011、2012、2013では位置サーボを、2014では速度サーボを採用している。図示した2003の曲線は、位置サーボ時には理想位置プロファイルを示し、速度サーボ時には理想速度プロファイルによって動作した場合の到達想定位置プロファイルを示している。図示した2004の曲線は、速度サーボ時には理想速度プロファイルを示し、位置サーボ時には理想位置プロファイルに追従して動作するために求められる要求速度プロファイルを示している。
【0022】
2005は、理想速度プロファイル2004との比較を容易とするため、コギングによる高い周波数での変動を平均化した場合の、物理的なモータの現実駆動速度プロファイルを示している。理想位置プロファイル2003を入力としてフィードバック制御をかけていくと、理想速度プロファイル2004に対して若干の遅れが出ているが、位置決め制御領域2014に進むに従って理想速度に近くなり、最終的な停止直前の速度としては位置決め精度を達成できる速度V_APPROACHに収束している。なお、減速制御領域2013から位置決め制御領域2014への移行は、物理的な駆動速度状態に関わらず、位置がS_APPROACHに達した瞬間に行われるものとする。
【0023】
2005のプロファイルは、超音波モータのようにコギングによるトルク変動がないモータを駆動した場合には、現実に達成することが可能であるが、ここではコギングによるトルク変動があるDCモータを駆動することを想定しているため、実際の現実速度プロファイルの形状は、2005に対して更にコギングによるトルク変動の影響が加わり、2006あるいは2007に示した形状となる。
【0024】
2006のプロファイルは、移動開始時点でのDCモータの位相が、2007のプロファイルと反対である場合を示しており、実際にはこの2つのパターンだけでなく、DCモータの移動開始時の位相により、トルク変動により速度が速くなるポイント1004及び速度が遅くなるポイント1005の位置が時間的にずれた様々なパターンが生じ得る。
【0025】
図中のS_APPROACHは、上述のように減速制御領域2013から位置決め制御領域2014に移行する位置を示しており、S_STOPは停止位置を示している。T_ADDは加速制御領域2011に費やされる所要時間であり、T_DECは減速制御領域2013に費やされる所要時間である。T_FLATは定速制御領域2012に費やされる時間であり、移動開始位置を0としたときの停止位置S_STOP、すなわち総移動距離に対する理想位置プロファイル2003を設定した時点で決定される固定値である。
【0026】
T_APPROACHは位置決め制御領域2014に費やされる時間であり、制御対象が実際に動いたときに、位置決め制御領域2014に移行する位置S_APPROACHから停止位置S_STOPまでの距離S_APR_STOPを移動するのに要する時間である。この図に示した2005では、位置決め領域を駆動制御対象が理想速度で動いた場合をモデルとして示しているが、現実の制御においては、理想通りの物理的動作は一般的に大変困難である。
【0027】
高速かつ高精度の位置決めを行うためには、理想位置プロファイル2003のカーブをその系に適合するようにチューニングする必要がある。具体的には、定速制御領域2012の速度は、位置決め所要時間を短縮するために系の性能の許す限り速く、位置決め制御領域2014の速度は、位置決め精度の向上を実現するために系の性能の許す限り遅く、さらに加速制御領域2011、減速制御領域2013、及び位置決め制御領域2014の距離は、位置決め所要時間を短縮するために系の性能の許す限り短くなるように、理想位置プロファイル2003を設定することが望ましい。
【0028】
しかしながら、このようなチューニングの詳細な手法については本発明の主題ではないので、ここではすでに理想位置プロファイル2003が最適に調整されているものとして説明する。
【0029】
上述のように、2006及び2007は、図1に関して説明したようなコギングによるトルク変動を有するDCモータを用いて同様の制御を施した場合の、物理的なモータの速度プロファイルを示している。大局的には、理想的なモータにおける現実速度プロファイル2005と同様の曲線となるが、コギングによるトルク変動の影響による速度変動があるため、位置決め制御領域2014に移行した瞬間の速度を目標となる速度V_APPROACHと比較すると、2006では速く、2007では遅くなってしまっている。
【0030】
この影響により、2006で示したプロファイルでは、停止位置S_STOPに到達した瞬間の速度がV_PROMISEを超えてしまっている。この速度では、装置に要求される停止条件を満たすことはできないので、停止位置の精度が保証されず、停止位置をオーバーランする可能性がある。
【0031】
一方、2007で示したプロファイルでは、位置決め制御領域2014における速度の平均が低くなるため、実際に停止位置S_STOPに到達するまでの時間が、T_APPROACHよりも長くなってしまい、所要時間が長くなるという問題が生じる。
【0032】
2006のプロファイルにおける停止位置の問題を解決するためには、位置決め制御領域に移行する際の速度をデフォルトの値V_APPROACHよりも下げることで容易に対処できる。しかしながら、このようにすると、移動開始時のモータの位相により2007に示すプロファイルとなったときに、所要時間が長くなるという問題を更に悪化させてしまう。
【0033】
また逆に、2007における所要時間の問題を解決するためには、位置決め制御領域に移行する際の速度をデフォルトの値V_APPROACHよりも上げることで容易に対処できる。しかしながら、このようにすると、移動開始時のモータの位相により2006に示すプロファイルとなったときに、停止位置の精度が保証されないという問題を更に悪化させてしまう。
【0034】
更に、DCモータのコギングには周期が存在するが、この周期は定量的に正確に検知することが難しい。図では近似的にサインカーブで示しているが、実際のトルク変動は個体毎にばらつきがあり、サインカーブで表せない様々な特性となる。このため、同じ種類・型番であってもトルク変動の特性は同一とはならず、あらゆるモータに対して汎用的、普遍的に完全に適用できる曲線(プロファイル)は存在しない。
【0035】
また、エンコーダから読み込む論理的位置情報と、コギングによるトルクリップルの周期を360度とみなした場合の位相角とを関連付けて制御することも考えられるが、この場合、装置がパワーオフされる度に論理的位置情報が初期化されてしまうため、装置がパワーオンした後に行う移動の際の停止位置での速度が、2006に示すように最終的に目標となる速度を超過するのか、2007に示すように最終的に目標となる速度未満となるのかを、予め予測して制御することが困難である。
【0036】
以上のように、使用するDCモータのコギング特性に応じて位置決め制御領域の目標速度(V_APPROACH)を設定し、高精度かつ高速な位置制御を達成することは事実上非常に困難である。
【0037】
かかる問題を解決すべく、各駆動を行う際に、目標位置及び予め設定された初期パラメータに従って該駆動の理想的なプロファイルを作成し、このプロファイルに従ってモータの駆動を制御し、各駆動の終了の際に、初期パラメータの値を評価し、評価の結果に応じて、初期パラメータの値を変更するという発明が、特願2001−148341号に提案されている。
【0038】
【発明が解決しようとする課題】
近年は、材質やサイズの異なる多種多様な記録媒体に記録することが望まれており、記録装置において搬送機構及びそのモータは、制御対象物である記録媒体の種類に応じて適切に制御する必要がある。
【0039】
このような問題に対処すべく、特願2001−148344号には、予備駆動を行っている間に、機構の移動を監視して、該機構を始動させるのに必要なモータへの指令値を求め、この指令値を駆動パラメータの初期値として用いることにより、制御対象物及び機構部分の摩擦力の個体差や使用環境の差異にかかわらず、高速かつ高精度な位置制御を可能とする発明が提案されている。
【0040】
しかしながら、上記特願2001−148344号に記載された発明では、予備駆動が行われるのは、電源が投入された後の1回だけであり、一旦起動された後は、同じパラメータが引き続いて使用される。これは、特願2001−148341号に記載された発明でも同様であり、一旦起動された後には、使用される記録媒体の種類が代わった場合にも、パラメータの値は引き継がれてしまう。
【0041】
更に、温度等の環境が変化した場合にも、機構部分の静止摩擦力等が変化するため、パラメータが引き継がれてしまうと、高速かつ高精度な位置制御を行うことができなくなる。
【0042】
本発明は以上のような状況に鑑みてなされたものであり、起動した後にも所定のタイミングでパラメータの設定を変更し、使用される記録媒体や環境が変化した場合においても高速かつ高精度な位置制御を可能とする、モータの制御方法及び制御装置を提供することを目的とする。
【0043】
【課題を解決するための手段】
上記目的を達成するために本発明のモータの制御方法は、モータを動力源として搬送対象物を搬送する搬送ローラを回転させる機器におけるモータの制御方法であって、
前記モータを駆動する際に、目標位置及び予め設定された所定の速度指令値に従って時間と位置との関係を示す位置プロファイルと、時間と速度との関係を示す速度プロファイルとを作成するプロファイル作成工程と、
前記位置プロファイル及び前記速度プロファイルに従って前記モータの駆動を加速領域、前記駆動対象物が前記加速領域の後に減速を始めた領域を含む減速領域、及び前記減速領域に続き静止に至るまでの位置決め領域に分けて制御する駆動工程と、
前記駆動工程を開始する指示を受ける毎に、前記駆動工程による先の搬送時と搬送対象物の種類が変わったか否かを外部から入力されるコマンドに基づいて判定する判定工程と、
前記判定工程にて前記搬送対象物の種類が変わったと判定した場合、前記所定の速度指令値に従って速度サーボにより前記搬送ローラを回転させて前記搬送対象物を搬送するよう前記モータを駆動する予備駆動と、前記予備駆動における前記搬送ローラの回転を監視して前記加速領域の開始時に前記モータへ出力する電流値に対応する積分補償量の算出と、前記搬送対象物を前記予備駆動が開始される前の位置に戻すように前記搬送ローラを回転させるよう前記モータを駆動する戻し駆動とを実行させた後に、前記積分補償量を反映して前記駆動工程を実行する一方、前記判定工程にて前記搬送対象物の種類が変わらないと判定した場合、前記予備駆動と前記積分補償量の算出と前記戻し駆動とを実行せずに、前記駆動工程を実行する制御工程と、を備える。
【0044】
また、上記目的を達成する本発明のモータの制御装置は、モータを動力源として搬送ローラを回転させて搬送対象物を搬送するモータの制御装置であって
前記前記モータを駆動する際に、目標位置及び予め設定された所定の速度指令値に従って、時間と位置との関係を示す位置プロファイルと、時間と速度との関係を示す速度プロファイルを作成するプロファイル作成手段と、
前記位置プロファイル及び前記速度プロファイルに従って前記モータの駆動を加速領域、前記加速領域の後に減速を始めた領域を含む減速領域、及び前記減速領域に続き静止に至るまでの位置決め領域に分けて制御する駆動手段と、
前記駆動手段による駆動の指示を受ける毎に、前記駆動手段による先の搬送時と前記搬送対象物の種類が変わったか否かを外部から入力されるコマンドに基づいて判定する判定手段と、
前記判定手段にて前記搬送対象物の種類が変わったと判定した場合、前記所定の速度指令値に従って速度サーボにより前記搬送ローラを回転させて前記搬送対象物を搬送するよう前記モータを駆動する予備駆動と、前記予備駆動における前記搬送ローラの回転を監視して前記加速領域の開始時に前記モータへ出力する電流値に対応する積分補償量の算出と、前記搬送対象物を前記予備駆動が開始される前の位置に戻すように前記搬送ローラを回転させるよう前記モータを駆動する戻し駆動とを実行させた後に、前記積分補償量を反映して前記駆動手段による実行を行わせる一方、前記判定手段にて前記搬送対象物の種類が変わらないと判定した場合、前記予備駆動と前記積分補償量の算出と前記戻し駆動とを実行せずに、前記駆動手段による駆動を実行する制御手段と、を備える。
【0045】
すなわち、本発明では、モータを動力源として搬送対象物を搬送する搬送ローラを回転させる機器におけるモータの制御において、前記モータを駆動する際に、目標位置及び予め設定された所定の速度指令値に従って時間と位置との関係を示す位置プロファイルと、時間と速度との関係を示す速度プロファイルとを作成し、プロファイルに従って前記モータの駆動を加速領域、前記駆動対象物が前記加速領域の後に減速を始めた領域を含む減速領域、及び前記減速領域に続き静止に至るまでの位置決め領域に分けて制御をする駆動をし、前記駆動を開始する指示を受ける毎に、先の搬送時と搬送対象物の種類が変わったか否かを外部から入力されるコマンドに基づいて判定し、前記搬送対象物の種類が変わったと判定した場合、前記所定の速度指令値に従って速度サーボにより前記搬送ローラを回転させて前記搬送対象物を搬送するよう前記モータを駆動する予備駆動と、前記予備駆動における前記搬送ローラの回転を監視して前記加速領域の開始時に前記モータへ出力する電流値に対応する積分補償量の算出と、前記搬送対象物を前記予備駆動が開始される前の位置に戻すように前記搬送ローラを回転させるよう前記モータを駆動する戻し駆動とを実行させた後に、前記積分補償量を反映して前記駆動を実行する一方、前記搬送対象物の種類が変わらないと判定した場合、前記予備駆動と前記積分補償量の算出と前記戻し駆動とを実行せずに、前記駆動を実行する制御を行う。
【0046】
このようにすると、例えば、機構の駆動が所定時間以上行われていないタイミング、機器に関する情報が所定の範囲内にないと判定されたタイミング、前回の駆動時と機構によって搬送される搬送対象物の種類が変化したと判定されたタイミング等のタイミングで、パラメータの値をデフォルト値に戻し、駆動条件や対象が異なった場合に、パラメータの値が引き継がれることによって生じる不具合を防止することができる。
【0047】
従って、起動した後にも所定のタイミングでパラメータの設定を変更し、使用される記録媒体や環境が変化した場合においても高速かつ高精度な位置制御が可能となる。
【0048】
【発明の実施の形態】
以下、本発明の好適な実施形態について図面を参照して詳細に説明する。ここで説明する実施形態は、着脱可能なインクタンクを備えた記録ヘッドを搭載したシリアル式インクジェットプリンタにおいて、記録媒体搬送用のラインフィードモータの制御に、本発明のモータの制御方法を適用したものである。
【0049】
<第1の実施形態>
図3は本発明の第1の実施形態に係るシリアル式インクジェットプリンタの全体図である。同図において、101はインクタンクを有する記録ヘッド、102は記録ヘッド101を搭載するキャリッジである。キャリッジ102の軸受け部には主走査方向に摺動可能な状態でガイドシャフト103が挿入され、そのシャフトの両端はシャーシ114に固定されている。このキャリッジ102に係合したキャリッジ駆動伝達手段であるベルト104を解して、キャリッジ駆動手段である駆動モータ105の駆動が伝達され、キャリッジ102が主走査方向に移動可能である。
【0050】
記録待機中において記録用紙115は、給紙ベース106にスタックされており、記録開始時には給紙ローラ(不図示)により記録用紙が給紙される。給紙された記録用紙を搬送するため、DCモータである用紙搬送用モータ(107)の駆動力により伝達手段であるギア列(モータギア108、搬送ローラギア109)を介して搬送ローラを回転させ、ピンチローラばね(不図示)により搬送ローラ110に押圧され従動回転するピンチローラ111とこの搬送ローラ110とにより記録用紙115は適切な送り量だけ搬送される。ここで、搬送量は搬送ローラ109に圧入されたコードホイール(ロータリーエンコーダフィルム116)のスリットをエンコーダセンサ117で検知、カウントすることで管理され、高精度送りを可能としている。
【0051】
図4は、図3に示したプリンタの制御構成を説明するブロック図である。
【0052】
図において、401はプリンタ装置のプリンタ制御用のCPUで、ROM402に記憶されたプリンタ制御プログラムやプリンタエミュレーション、記録フォントを利用して記録処理を制御する。
【0053】
403はRAMで、記録のための展開データ、ホストからの受信データを蓄える。404はプリンタヘッド、405はモータを駆動するモータドライバ、406はプリンタコントローラで、RAM403のアクセス制御やホスト装置とのデータのやりとりやモータドライバへの制御信号送出を行う。407はサーミスタ等で構成される温度センサで、プリンタ装置の温度を検知する。
【0054】
CPU401はROM402内の制御プログラムにより本体のメカ的/電気的制御を行いつつ、ホスト装置からプリンタ装置へ送られてくるエミュレーションコマンド等の情報をプリンタコントローラ406内のI/Oデータレジスタから読み出し、コマンドに対応した制御をプリンタコントローラ406内のI/Oレジスタ、I/Oポートに書き込み、読み出しを行う。
【0055】
図5は、図4に示したプリンタコントローラ406の詳細構成を説明するブロック図であり、図4と同一のものには同一の符号を付してある。
【0056】
図において、501はI/Oレジスタで、ホストとのコマンドレベルでのデータのやり取りを行う。502は受信バッファコントローラで、レジスタから受信データをRAM403に直接書き込む。
【0057】
503は記録バッファコントローラで、記録時にはRAMの記録データバッファから記録データを読み出し、プリンタヘッド404に対してデータの送出を行う。504はメモリコントローラで、RAM403に対して3方向のメモリアクセスを制御する。505はプリントシーケンスコントローラで、プリントシーケンスをコントロールする。231はホストインターフェースで、ホストとの通信を司る。
【0058】
図6は、一般的なDCモータの位置サーボによる制御手順(6000)を示すブロック図である。本実施形態において位置サーボは、加速制御領域、定速制御領域、減速制御領域において使用される。このようなDCモータの制御は、PID(proportional integral and differential)コントロールあるいは古典制御と呼ばれており、以下にその手順を説明する。
【0059】
まず、制御対象に与えたい目標位置を、理想位置プロファイル6001という形で与える。本実施形態においては、これは該当する時刻においてラインフィードモータによって搬送された紙が到達しているべき絶対位置に該当する。時刻の進行とともに、この位置情報は変化していく。この理想位置プロファイルに対する追値制御を行うことで、本実施形態の駆動制御が行われる。
【0060】
装置にはエンコーダセンサ6005が具備されており、これによりモータの物理的な回転を検知する。エンコーダ位置情報変換手段6009は、エンコーダセンサ6005が検知したスリット数を累積加算して絶対位置情報を得る手段であり、エンコーダ速度情報変換手段6006はエンコーダセンサ6005の信号と、プリンタに内蔵された時計(タイマ)から、現在のラインフィードモータの駆動速度を算出する手段である。
【0061】
理想位置プロファイル6001から、位置情報変換手段6009により得られた実際の物理的位置を減算した数値を、目標位置に対して足りない位置誤差として、6002以降の位置サーボのフィードバック処理に受け渡す。6002は位置サーボのメジャーループであり、一般的には比例項Pに関する計算を行う手段が知られている。
【0062】
6002における演算の結果としては、速度指令値が出力される。この速度指令値が、6003以降の速度サーボのフィードバック処理に受け渡される。速度サーボのマイナーループは、比例項P、積分項I、微分項Dに対する演算を行うPID演算により行う手段が一般的である。
【0063】
本実施形態においては、速度指令値の非線形な変化が発生した場合の追従性を改善し、なおかつ追値制御時の微分演算の弊害を防ぐために、一般に微分先行形と呼ばれる手法を示しており、エンコーダ速度情報変換手段6006で得られたエンコーダ速度情報は、6002で得られた速度指令値との差を取る前に、微分演算手段6007を通される。この手法自体は本発明の主題となるものではなく、制御対象の系の特性によっては、6003において微分演算を行えば充分なものもある。
【0064】
速度サーボのマイナーループにおいては、速度指令値からエンコーダ速度情報を減算した数値を、目標速度に対して足りない速度誤差として、PI演算回路6003に受け渡し、その時点でDCモータに与えるべきエネルギーを、PI演算と呼ばれる手法で算出する。それを受けたモータドライバ回路は、例えばモータ印加電圧は一定として、印加電圧のパルス幅を変化させる手段(以下「PWM(Pules Width Modulation)制御」と呼ぶ)を用い、印加電圧のDutyを変化させて、電流値を調節し、DCモータ6004に与えるエネルギーを調節し、速度制御を行う。
【0065】
電流値を印加されて回転するDCモータは、6008の外乱による影響を受けながら物理的な回転を行い、その出力がエンコーダセンサ6005により検知される。
【0066】
図7は一般的なDCモータの速度サーボによる制御手順(7000)を説明するブロック図である。図6と同様な構成要素には同じ符号を伏して説明を省略する。本実施形態において速度サーボは、位置決め制御領域において使用される。このようなDCモータの制御は、PIDコントロールあるいは古典制御と呼ばれており、以下にその手順を説明する。
【0067】
まず、制御対象に与えたい目標速度を、理想速度プロファイル7001という形で与える。本実施形態においては、これは該当する時刻においてラインフィードモータにより紙を搬送すべき理想速度であり、該当する時刻における速度指令値ということになる。時刻の進行とともに、この速度情報は変化していく。この理想速度プロファイルに対して追値制御を行うことで、本実施形態の駆動制御が行われる。
【0068】
速度サーボにおいては、比例項P、積分項I、微分項Dに対する演算を行うPID演算により行う手段が一般的である。本実施形態においては、速度指令値の非線形な変化が発生した場合の追従性を改善し、なおかつ追値制御時の微分演算の弊害を防ぐために、一般に微分先行形と呼ばれる手法を示しており、6006で得られたエンコーダ速度情報は、理想速度プロファイル7001で得られた速度指令値との差を取る前に、微分演算手段7003を通される。この手法自体は本発明の主題となるものではなく、制御対象の系の特性によっては、7002において該微分演算を行えば充分なものもある。
【0069】
速度サーボにおいては、速度指令値からエンコーダ速度情報を減算した数値を、目標速度に対して足りない速度誤差として、PI演算回路7002に受け渡し、その時点でDCモータに与えるべきエネルギーを、PI演算と呼ばれる手法で算出する。それを受けたモータドライバ回路は、例えばPWM制御を用い、印加電圧のDutyを変化させて、電流値を調節し、DCモータ6004に与えるエネルギーを調節し、速度制御を行う。
【0070】
電流値を印加されて回転するDCモータ6004は、6008の外乱による影響を受けながら物理的な回転を行い、その出力がエンコーダセンサ6005により検知される。
【0071】
図8、9、10は、図2において説明した、コギングによるトルク変動の及ぼす影響と制御について、各ケースについて更に詳細に説明するための図である。
【0072】
図8は、停止直前の速度v_stopが、平均的かつ理想的な値V_APPROACHで終了する場合を示し、図9は、v_stop>V_APPROACH、すなわち速度超過で終了する場合を示し、図10は、t_approach>T_APPROACH、すなわち時間超過で終了する場合を示している。
【0073】
8001は理想位置プロファイルであり、位置サーボを行う2011、2012、2013の各領域に対して設定されるが、S_APPROACHまでしか計算されない。これは、S_APPROACHを通り過ぎると速度サーボに切り替わるため、S_APPROACH以降ではこの理想位置プロファイルが不必要であるからである。8001における減速所要時間T_DECは実際の駆動と関わりなく一定であり、これに該当する制御領域を理想減速制御領域9001として示すものとする。
【0074】
8003、9003、10003は、各図における外乱等の影響を考慮した現実位置プロファイルである。ここでは、説明対象の明確化を図るため、コギングによる高い周波数での変動を平均化した場合の、物理的なモータの現実位置プロファイルを示している。
【0075】
位置サーボにおいては、時間的な遅れが必ず発生するため、理想位置プロファイル8001に対して8003、9003、10003の現実位置プロファイルはいずれも遅れを持っている。従って、理想位置プロファイル8001が終了しても、現実位置はS_APPROACHには到達しないことが一般的であり、本実施形態においては、9001が終了してから現実の駆動がS_APPROACHに到達するまでの間には、仮想の理想位置プロファイル8006によって位置サーボへの指令位置値として代用するものとする。この仮想の理想位置プロファイル8006は、理想位置プロファイル8001の最終的な傾きを用いて、理想位置プロファイルの終点から伸ばした直線とする。
【0076】
8005、9005、10005は、2005と同様、説明対象の明確化を図るため、コギングによる高い周波数での変動を平均化した、簡略化された概念における場合の、物理的なモータの現実速度プロファイルを示しており、ここでは各図における外乱等の影響を考慮したプロファイルを各々示している。
【0077】
その他の図2と同様な部分は、図2と同じ符号で示している。ただし、図2においては定数値であった位置決め制御領域2014に費やされる時間の理想値T_APPROACHに対して、図8、9、10においては現実の駆動を想定した場合に外乱によってあらゆる値に変化する現実の値として、位置決め制御領域2014に費やされる時間として現実変数値t_approachを追加している。
【0078】
なお、本実施形態における説明では、定数値を英大文字、変数値を英小文字で示している。同一スペリングの値について英大文字、英小文字の表記がある場合、英大文字で示された値は理想定数値であり、英小文字で示された値は同じ内容の値について変化しうる変数値を示している。
【0079】
S_DECは定速制御領域2012が終了して減速制御領域2013が開始される位置を示しており、あくまでも理想位置プロファイル8001によって決定される値であるため、現実の駆動における外乱の影響とは無関連である。
【0080】
上記のように、図8は停止直前速度v_stopが、平均的かつ理想的な値V_APPROACHで終了する場合であり、v_stop<V_PROMISE、かつ、t_approach=T_APPROACH、であるため、停止直前速度、駆動所要時間の双方が要件を満たしている。
【0081】
また、図9は、v_stop>V_APPROACH、すなわち速度超過で終了するため、停止直前速度の要件を満たすことができない。実際にこのような駆動が発生する主たる原因は、主に減速領域におけるコギングによるトルク変動の影響により、S_APPROACHに到達した瞬間の速度が過剰であるためであるが、S_STOPの位置がちょうどモータのトルク変動により速度が速くなるポイント1004に対応する位相角である場合にも、同様の結果をもたらしうる。
【0082】
一方、図10は、t_approach>T_APPROACH、すなわち時間超過で終了するため、駆動所要時間の要件を満たすことができない。実際にこのような駆動が発生する主たる原因は、主に減速領域におけるコギングによるトルク変動の影響により、S_APPROACHに到達するかなり以前から速度が落ちてしまうためであるが、S_STOPの位置がちょうどモータの速度が遅くなるポイント1005に対応するの位相角である場合にも、同様の結果をもたらしうる。
【0083】
図11は、本実施形態における駆動制御処理を説明するフローチャートであり、図12は、図11の各処理に関わる信号の状態を速度プロファイルと共に同じ時間軸上に示したタイミングチャートである。
【0084】
ステップS11011でパワーオンがなされると、ステップS11012に進み、デフォルトの値としてv_approachにはV_APPROACHを、s_apr_STOPにはS_APR_STOPが設定される。
【0085】
ステップS11101では、駆動命令が発行されない状態で経過した時間をカウントするためのタイマカウンタwaittime_counterに0を代入して初期化する。
【0086】
ステップS11013では、プリンタシステムにおいて駆動命令が発行されたか否かを判定し、駆動命令が来ていなければ待機処理を行うべくステップ11102に進み、駆動命令が来ていれば駆動制御を開始すべくステップS11001に進む。
【0087】
ステップS11102では、タイマカウンタwaittime_counterをカウントアップし、ステップS11103で5msecの時間待機する。そしてステップS11104で、タイマカウンタwaittime_counterの値が、閾値WAITTIME_LIMITに達しているか否かの判定を行う。この閾値WAITTIME_LIMITの値は、環境温度やモーター蓄熱状態などが変化している可能性のある時間に相当する値である。
【0088】
waittime_counterの値がWAITTIME_LIMIT未満であれば、ステップS11013に戻り、再度駆動命令がくるのを待つ。一方、waittime_counterの値がWAITTIME_LIMIT以上であれば、ステップS11012に戻り、v_approach及びs_apr_STOPをデフォルトの値に戻す。
【0089】
ステップS11001で駆動制御処理が開始されると、ステップS11002で駆動制御準備手段が行われる。ここで行われる処理については後述するが、その概略は、一般的にモータ制御タスクに記述される処理であり、駆動目的に適したテーブルの選択、駆動量に合致したT_FLATの設定、本発明の主題である評価手段の結果を次回の駆動で使用する理想速度プロファイルに反映させる処理、各種ワーク領域の設定を行い、最後にタイマ割り込み処理を司るタイマに起動をかけて終了する。
【0090】
ステップS11002でタイマが起動されると、ステップS11003で示された実駆動処理に移行する。この処理は、一般的にタイマ割り込み処理内に記述される処理であり、たとえば1msec毎に1回の割り込みを行い、エンコーダの値を読み出し、PID演算等により出力すべき電流の値を算出し、モータに対して算出した値を出力するものである。
【0091】
ステップS11003の処理と並行して、システムにおいては停止位置S_STOPに到達したかどうかの監視が行われており、到達が検知されると駆動目標位置への到達検知処理ステップS11004が起動されて割り込みが発生し、ステップS11005の駆動制御終了処理へと処理は移行する。
【0092】
ステップS11005においては、モータに対する出力をいち早くディセーブルにしてからタイマを停止し、本発明の主題である評価処理を実行して処理を終了する。
【0093】
以上の各処理を行うことで、1つの駆動処理はステップS11006の駆動制御終了へと至ることになる。
【0094】
図13は、ステップS11002の駆動制御準備処理での動作を詳細に示すフローチャートである。
【0095】
駆動制御準備処理においては、駆動目的及び駆動量に適したテーブルの選択を行い、該テーブルのv_approach、V_FLAT、T_DEC、s_apr_STOP、V_START、T_ADD、T_FLATを取得する。シリアルプリンタ装置においては、処理速度の高速化、静音化、給紙モータとの同期制御等のために、ラインフィードモータに関して複数種類のテーブルを持つことが一般的であり、ここで使用するテーブルの選択を行うものとする。ここでは、更にT_DECを変数領域t_decに、S_DECを変数領域s_decに格納する場合について説明する。
【0096】
ステップS13001では、該テーブルに適したフィードバック制御のゲイン設定等を行う。ここでの処理は従来より行われている処理と同様であり、本実施形態の主題とするところではないため説明を省略する。
【0097】
ステップS13000は理想位置プロファイル生成処理であり、理想位置プロファイル8001を生成するための処理であり、その詳細を以下に説明する。
【0098】
ステップS13002では加速駆動プロファイルを生成する。ここで行われる処理は従来より行われている処理と同様であり、例えば、加速駆動プロファイルとしては、時間を入力とし速度を出力とする1次関数または3次関数を用い、該出力を加算していくことで位置プロファイルを得る方法が一般的である。
【0099】
ステップS13003では定速駆動プロファイルを生成する。ここで行われる処理も従来より行われている処理と同様であり、例えば、定速駆動プロファイルとしては、V_FLATにより駆動した場合の位置の変化を計算する方法が一般的である。
【0100】
ステップS13004では減速駆動プロファイルを生成する。これは本実施形態の特徴的な処理であり、以下で詳細について説明する。
【0101】
ステップS13005において、時刻値Txを初期化し、時刻Txに到達すべき理想位置S(Tx)の初期値として、減速開始位置であるs_decを設定する。
【0102】
ステップS13006では、速度の3次減速曲線により時刻Txにおける理想速度V(Tx)を算出する。本実施形態において速度の3次減速曲線は、以下の式により求めることができる。すなわち、
V(Tx)=(V_FLAT−v_approach) (2Tx−3t_dec)Tx2/t_dec3+V_FLAT
である。
【0103】
この式からわかるように、v_approachの変化に追従して、フレキシブルに曲線を変化させうる構造となっているところに特徴がある。もちろん本発明で使用する減速曲線はこの3次減速曲線に限定されるものではなく、系の適性に応じて、1次減速曲線やその他の関数で示される曲線であってもよく、v_approachの変化を反映させうる曲線であれば、いかなる減速曲線においても本発明の意図する効果を享受することができる。
【0104】
ステップS13007では、S(Tx)に対してV(Tx)を加算しうることで、Tx+1において到達すべき理想位置S(Tx+1)を算出する。
【0105】
ステップS13008では、Txをインクリメントする。そしてステップS13009で、カウンタTxの値が理想減速制御領域9001の終了を意味する値t_decになるまで、ステップS13006〜S13008の処理が繰り返されて各TxにおけるV(Tx)、S(Tx)の計算が続けられる。
【0106】
以上の処理が終了すると、ステップS13010に進み、プロファイル計算で加算した時刻カウンタTxを実際の制御に備えて再度初期化したり、タイマを起動するための各種設定等を行う。ここでの処理は従来行われているものと同様であるので説明を省略する。
【0107】
そしてステップS13011によりタイマの起動を行うと、ステップS13012で本駆動制御準備処理は終了する。
【0108】
図14は、ステップS11003の実駆動処理で行われる動作を示したフローチャートであり、タイマ割り込みが発生する毎に遂行される処理について示したものである。
【0109】
タイマ割り込みが発生してステップS11003が起動されると、ステップS14001に進み、エンコーダ位置情報変換手段6009によって現在位置を得てS(Tx)への代入が行われる。
【0110】
次にステップS14002において、位置決め制御領域2014に到達しているか否かを判定し、まだ到達していなければステップS14011に、到達していればステップS14005に進む。
【0111】
ステップS14011では、理想減速制御領域9001内にいるか否かを判定し、まだ該領域内にいる場合にはステップS14003に、逸脱してしまっている場合にはステップS14012に進む。
【0112】
ステップS14003では、理想位置プロファイル生成処理13000で生成した位置プロファイルから、現時刻Txに該当する位置情報を理想位置プロファイルとして採用し、ステップS14004に進む。
【0113】
一方、ステップS14012では、すでに理想位置プロファイル生成処理ステップS13000で生成される領域を逸脱しているため、該理想位置プロファイルの最終的な傾きを用いて、該理想位置プロファイルの終点から伸ばした直線を生成し、仮想の理想位置プロファイルとして採用し、ステップS14004に進む。
【0114】
ステップS14004では、以上により得た位置指令値を用い、図6に示した位置サーボ制御6000を実行させ、ステップS14007に進む。
【0115】
ステップS14005では、理想速度プロファイルとして、v_approachを採用し、該値を速度指令値として、ステップS14006で図7に示した速度サーボ制御7000を実行させ、ステップS14007に進む。
【0116】
ステップS14007では、演算結果の電流値をモータに出力し、ステップS14008で割り込み内の処理を終了する。
【0117】
図15は、ステップS11005の駆動制御終了処理で行われる動作を説明するフローチャートである。
【0118】
ステップS15001で出力電流をディセーブルにしタイマを停止すると、ステップS15002の評価処理に進む。この評価処理は本実施形態において特徴的な処理であり、以下で詳細について説明する。
【0119】
まずステップS15021で、理想値であるT_APPROACHと、現実に要したt_approachとの差をとり、dif_approachに代入し、ステップS15003に進む。
【0120】
studyPrmは、t_approachが理想値から逸脱している度合いを、次の駆動におけるv_approachに反映させるための改善係数である。
【0121】
ステップS15003において、dif_approachとSTUDY_T_HISPEEDLIMITを比較する。そして、dif_approachが小さすぎる場合には、ステップS15011に進んで、studyPrmとしてstudy_prm_emergencyを採用する。一方、小さすぎない場合にはステップS15004に進んで、study_prm_normalを採用する。ここで、study_prm_emergency>study_prm_normalである。
【0122】
該処理は、t_approachがあまりにも短すぎて、減速しきらないままにS_STOPに到達してしまい、v_stopが高速になってしまう場合を想定している。かかる場合にはステップS15011でstudy_prm_emergencyを採用することで、後述するステップS15007での計算により、最終的に評価処理S15002で出力されるv_approachはより低くなる。すなわち、study_prm_normalにより計算したv_approachを用いた場合よりも、次の駆動におけるt_approachはより急激に長くなることが期待でき、v_stopが高速になってしまい停止位置の精度が保証されないという問題を改善できる。
【0123】
なお、study_prm_emergencyをいかなる場合にもstudyPrmとして採用すると、t_approachが長い場合に、より急激なt_approachの短縮を招いて、次の駆動におけるv_stopが高速になってしまうという弊害が生じるが、ステップS15003による判定においてそのような状態となった場合の分岐先をステップS15004にしているため、そのような場合にはstudy_prm_normalが採用される。
【0124】
ステップS15005及びS15006では、dif_approachの絶対値とSTUDY_T_INPUTLIMITを比較し、dif_approachの絶対値が大きい場合には、ステップS15012又はS15013において、その値を最大リミット値である±STUDY_T_INPUTLIMITに変更する。該処理は、突発的で極大な外乱の影響を押さえるための処理である。
【0125】
このように、ステップS15003、S15011、S15004、S15005、S15006、S15012、S15013は、本実施形態におけるv_approachの計算において、非常に有効な作用を実現している。
【0126】
これらの処理の目的は、図9に関して説明したように、v_stop>V_APPROACH、すなわち速度超過で終了して停止直前速度の要件を満たすことができない場合と、図10に関して説明したように、t_approach>T_APPROACH、すなわち時間超過で終了して駆動所要時間の要件を満たすことができない場合の双方を改善することにある。
【0127】
ここで、ラインフィードモータの位置決め制御においては、停止位置精度の保証はいかなる状況でも達成されなければならないが、駆動所要時間は平均的に達成されていれば許され、許容される範囲内であれば達成されない場合が生じても問題とはならない。
【0128】
従って、停止直前速度v_stopがV_APPROACHを超過している場合には早急な改善が必要とされるが、駆動所要時間については、その改善によりv_stopの悪化を招いてしまう可能性がある場合には、たとえ改善効果が鈍くなったとしても慎重に進める必要がある。ステップS15003、S15011、S15004、S15005、S15006、S15012、S15013での処理は、この点を考慮している。
【0129】
ステップS15007は、本実施形態において最も重要な処理であり、評価処理の核をなすものである。
【0130】
すなわち、理想のT_APPROACHから、終了した駆動で実際に検出されたt_approachを引いた差dif_approachに、適切な係数studyPrmをかけ、それを現在のv_approachから引くことで、次の駆動で使用されるv_approachを算出する。
【0131】
以上の処理が終了すると、ステップS15008で処理を終了する。
【0132】
ここで、ステップS15007での処理による作用について、図16、17、18、19を用いて以下で具体的に説明する。
【0133】
図16は、図9のv_stopが超過状態となる場合の駆動を示すグラフに、コギングによるトルク変動を明示した現実速度プロファイルの曲線16006を追加したグラフであり、図17は、ステップS15007の処理が行われた後の駆動状態を示したグラフである。
【0134】
上述のように、このような駆動が発生する主たる原因は、実際にこのような駆動が発生する主たる原因は、主に減速領域におけるコギングによるトルク変動の影響により、S_APPROACHに到達した瞬間の速度が過剰であるためであるが、S_STOPの位置がちょうどモータのトルク変動により速度が速くなるポイント1005に対応する位相角である場合にも、同様の結果をもたらしうる。図16は、この2つの要因を、わかりやすくするため同時に示したものである。
【0135】
ここで、ステップS15007の処理は、t_approachが短すぎることを改善するため、図17に示したように、次の駆動のv_approachを減少させることで位置決め制御領域2014の平均速度を落としてt_approachの増加とv_stopの低速化をはかる方向に作用する。
【0136】
図18は、図10のt_approachが超過状態となる場合の駆動を示すグラフに、コギングによるトルク変動を明示した現実速度プロファイルの曲線18006を追加して示したグラフであり、図19は、ステップS15007の処理が行われた後の駆動状態を示したグラフである。
【0137】
上述のように、実際にこのような駆動が発生する主たる原因は、主に減速領域におけるコギングによるトルク変動の影響により、S_APPROACHに到達するかなり以前から速度が落ちてしまうためであるが、S_STOPの位置がちょうどモータの速度が遅くなるポイント100に対応する位相角である場合にも、同様の結果をもたらしうる。図18は、この2つの要因を、わかりやすくするために同時に示したものである。
【0138】
ここで、ステップS15007の処理は、t_approachが長すぎることを改善するため、図19に示したように、次の駆動のv_approachを増加させることで位置決め制御領域2014の平均速度を上げてt_approachの減少とv_stopの高速化をはかる方向に作用する。
【0139】
図20は、改善係数studyPrmに代入される変数study_prm_emergency及びstudy_prm_normalの設定処理を示すフローチャートであり、この図を参照して本発明の特徴的な制御の詳細について説明する。
【0140】
まずステップS20001で、本発案の適用対象であるシリアルプリンタ装置の電源が投入されるとステップS20002に進む。lf_counterは、装置起動後ラインフィードモータが駆動された回数を記憶するためのカウンタであり、電源投入直後にはステップS2002で0にリセットされる。
【0141】
ステップS20003で、lf_counterと、起動後何回ラインフィードモータを駆動したら改善係数の値を変更するかの判定の基準値であるSTUDY_STARTCASEとを比較する。STUDY_STARTCASEに、たとえば整数3を採用すると、電源投入後3回の駆動まではステップS20005に進み、それ以降の駆動ではステップS20004に進むことになる。
【0142】
ステップS20005は、電源投入後の駆動回数が少なく、制御が理想状態から離れていると想定される場合に行われる処理であり、改善係数として大きめの値が設定される。本実施形態では基本となる改善係数STUDY_PRM_BASEの4倍の数値をstudy_prm_emergencyに、2倍の数値をstudy_prm_normalに設定する。
【0143】
一方、ステップS20004は、電源投入後に充分な回数だけ駆動された場合に行われる処理であり、改善係数として小さめの値が設定される。本実施形態では基本となる改善係数STUDY_PRM_BASEの2倍の数値をstudy_prm_emergencyに、1倍の数値をstudy_prm_normalに設定する。
【0144】
ステップS20006では、モータの駆動を開始する。ここでの駆動は、ステップS20004またはステップS20005で設定された改善係数を使用して行われる。
【0145】
ステップS20007で駆動が終了すると、ステップS20008でlf_counterの値がインクリメントされる。
【0146】
以上説明したように本実施形態では、駆動命令を待機している間の経過時間が、環境温度やモーター蓄熱状態などが変化している可能性のある時間以上となった場合に、パラメータv_approach及びs_apr_STOPをデフォルトの値に戻す。
【0147】
このようにすると、装置の状態がパラメータを設定した時点と異なっている可能性が高い状況において、パラメータを適切なタイミングで一旦デフォルト値に戻して再度設定することができ、現時点により適した駆動制御を行うことができる。
【0148】
なお、上記の説明では、駆動が行われない待機時間が予め設定した時間以上となったときに装置の情報が変化した可能性が高いと判断しているが、センサなどを用いて実際に温度等の装置の使用状況(環境)に関する情報を測定し、その値が予め設定した範囲を越えた場合にパラメータをデフォルト値に戻すようにしてもよい。
【0149】
<第2の実施形態>
次に、本発明に係る第2の実施形態について説明する。なお、以下の説明においては上記第1の実施形態と同様な部分については説明を省略し、第2の実施形態の特徴的な部分を中心に説明する。
【0150】
本実施形態は、搬送負荷の異なる記録媒体を使用する際に、パラメータの設定を変更するように、第1の実施形態における図11に示した処理のみに変更を加えたものであるため、該当部分の処理と作用・効果を中心に説明を行う。
【0151】
図21は、本実施形態における搬送部の機械的構成を示す概略図であり、(a)は記録媒体として普通紙を搬送している場合、(b)は記録媒体としてCD−Rを使用する場合に使用されるCD−Rトレイを搬送している場合をそれぞれ示している。
【0152】
搬送対象となる記録媒体としての普通紙20003又はCD−Rトレイ21003は、搬送ローラ110とピンチローラ111によって、両面を支持されている。モータギア108の回転力は搬送ローラギア109を介して搬送ローラ110へ伝達される。ピンチローラ111は、ピンチローラばね20001により搬送ローラ110に適切な圧力で押し付けられており、普通紙20003又はCD−Rトレイ21003が搬送ローラ110から浮き上がることを防いでいる。これらの構成により、搬送ローラ110からの搬送力は普通紙20003、CD−Rトレイ21003に対して少ないエネルギー損失で伝達され、これら記録媒体は搬送ローラ110とピンチローラ111が回転することによって搬送される。
【0153】
CD−Rトレイ21003は普通紙20003よりも厚いため、(b)に示すピンチローラ111と搬送ローラ110との間隔は、(a)と比べて離間した状態となる。このとき、ピンチローラばね20001は激しく縮んでいる。
【0154】
理想的な搬送機構としては記録媒体の種類にかかわらず搬送負荷が等しくなることが望ましい。しかしながら現実的には、例えば図示したピンチローラばね20001の圧力の違い等により、記録媒体の種類により搬送負荷が変わってしまうことが多い。本実施形態はこのような場合においても理想的なモータ制御が行えるようにするものである。
【0155】
以下、本実施形態における駆動制御処理を、図22のフローチャートを参照して説明する。なお、図22において図11と同じ処理は同じ参照符号で示している。
【0156】
ステップS11011でパワーオンがなされると、ステップS22001に進み、搬送しようとしている記録媒体の種類を表す変数prtmedia_nowを、未定であることを意味する定数PRTMEDIA_UNKOWNで初期化する。
【0157】
ステップS22002では、駆動命令が発行されたか否かを判定し、駆動命令が来るまで待機し、駆動命令が来たらステップS22003に進む。ステップS22003では、これから搬送しようとしている記録媒体の種類を識別し、普通紙であればステップS22004に進み、厚紙であればステップS22005に進み、CD−RトレイであればステップS22006に進む。記録媒体の種類の識別は、たとえばホストコンピュータから送信されるコマンドを解析することなどによって容易に行うことができる。
【0158】
ステップS22004では、直前の駆動を行ったときの記録媒体の種類を表す情報が格納されている変数prtmedia_nowを参照し、該変数の値がこれから搬送しようとしている普通紙と同じであるか否かを判定する。変数の値が普通紙と同じであればステップS11001に進んで駆動制御を開始し、一方、普通紙でないならばステップS22007に進む。
【0159】
ステップS22007では、変数prtmedia_nowに、普通紙を意味する定数PRTMEDIA_NORMALを代入する。そして、ステップS22010へ進んで、v_approachにはV_APPROACHを、s_apr_STOPにはS_APR_STOPを設定してデフォルト値に戻す。この後、ステップS11001に進んで駆動制御を開始する。
【0160】
ステップS22005では、直前の駆動を行ったときの記録媒体の種類を表す情報が格納されている変数prtmedia_nowを参照し、該変数の値がこれから搬送しようとしている厚紙と同じであるか否かを判定する。変数の値が厚紙と同じであればステップS11001に進んで駆動制御を開始し、一方、厚紙でないならばステップS22008に進む。
【0161】
ステップS22008では、変数prtmedia_nowに、厚紙を意味する定数PRTMEDIA_SPECIALを代入する。そして、ステップS22010へ進んで、v_approachにはV_APPROACHを、s_apr_STOPにはS_APR_STOPを設定してデフォルト値に戻す。この後、ステップS11001に進んで駆動制御を開始する。
【0162】
ステップS22006では、直前の駆動を行ったときの記録媒体の種類を表す情報が格納されている変数prtmedia_nowを参照し、該変数の値がこれから搬送しようとしているCD−Rと同じであるか否かを判定する。変数の値がCD−Rと同じあればステップS11001に進んで駆動制御を開始し、一方、CD−RでないならばステップS22008に進む。
【0163】
ステップS22008では、変数prtmedia_nowに、CD−Rを意味する定数PRTMEDIA_CDRを代入する。そして、ステップS22010へ進んで、v_approachにはV_APPROACHを、s_apr_STOPにはS_APR_STOPを設定してデフォルト値に戻す。この後、ステップS11001に進んで駆動制御を開始する。
【0164】
ステップS11001からS11006までの処理は、第1の実施形態における処理と同様であり、詳細な説明は省略する。ステップS11006の駆動制御終了処理が終わると、ステップS22002に戻って処理を続行する。
【0165】
以上説明したように本実施形態によれば、図21に示したように、搬送負荷の異なる記録媒体を使用する場合においても、記録媒体の種類が変化するごとにパラメータv_approach及びs_apr_STOPがデフォルトの値に戻されるため、異なる記録媒体に対して最適化されたパラメータを使用することがなく、一方、同じ記録媒体を使用する際には該記録媒体に対して最適化されたパラメータを使用するようにして、使用される記録媒体に適した搬送制御を行うことができる。
【0166】
<第3の実施形態>
次に、本発明に係る第3の実施形態について説明する。なお、以下の説明においては上記第1及び第2の実施形態と同様な部分については説明を省略し、第3の実施形態の特徴的な部分を中心に説明する。
【0167】
本実施形態は、第1の実施形態において積分補償量の初期値を0とした場合に起こる弊害を防止するものであり、第1の実施形態と異なる処理とその作用・効果について説明を行う。
【0168】
図23は、本実施形態におけるモータの制御において外乱の及ぼす影響と実際の制御との関係を図8と同様に示した図である。図中、横軸は時間を示しており、2001の縦軸は速度を、2002の縦軸は位置を示している。
【0169】
図23では停止直前速度v_stopが、平均的かつ理想的な値V_APPROACHで終了する場合を示している。
【0170】
23001は理想位置プロファイルを示しており、2004は理想速度プロファイルを示している。該理想位置プロファイル23001は、加速制御領域2011、定速制御領域2012、減速制御領域2013、位置決め制御領域2014の4つの制御領域により構成されている。
【0171】
2004の理想速度プロファイル2004において、V_STARTは初速度であり、V_FLATは定速制御領域2012の速度を示している。V_APPROACHは位置決め制御領域の速度を示しており、V_PROMISEは位置決め精度性能を達成するために絶対に守られなければならない停止直前速度の最速値を示している。v_stopは、現実の駆動を想定した場合に外乱によってあらゆる値に変化する現実の値としての停止直前速度である。実際の駆動における速度変動を考慮して、V_APPROACHはいかなる速度変動が発生してもv_stopがV_PROMISEを超えることがないよう充分に低く設定された速度であることが要求される。
【0172】
本実施形態においては、加速制御領域2011、定速制御領域2012、及び減速制御領域2013では位置サーボを採用し、位置決め制御領域2014では速度サーボを採用している。理想位置プロファイル23001の曲線は、位置サーボにおける理想位置のプロファイルを示している。理想速度プロファイル2004の曲線は、速度サーボ時には理想速度のプロファイルを示し、位置サーボ時には理想位置プロファイル23001に追従して動作するために求められる要求速度プロファイルを示している。
【0173】
理想位置プロファイル23001は、位置サーボを行う2011、2012、2013の各領域に対して設定されるが、S_APPROACHまでしか計算されない。これは、S_APPROACHを通り過ぎると速度サーボに切り替わるため、S_APPROACH以降では理想位置プロファイルが不必要であるからである。理想位置プロファイル23001における減速所要時間T_DECは、現実の駆動と関わりなく一定であり、これに該当する制御領域を理想減速制御領域24001として示すものとする。
【0174】
23003は、各状態における外乱等の影響を受けた現実位置プロファイルである。位置サーボにおいては、遅れが必ず発生するため、理想位置プロファイル23001に対して現実位置プロファイル23003はいずれも遅れを持っている。従って、理想位置プロファイル23001が終了しても、現実位置はS_APPROACHには到達しないことが一般的であり、本実施形態においては、理想位置プロファイル23001が終了してから現実の駆動がS_APPROACHに到達するまでの間には、仮想の理想位置プロファイル23006によって位置サーボへの指令位置を代用するものとする。仮想の理想位置プロファイル23006は、理想位置プロファイル23001の最終的な傾きを用いて、理想位置プロファイルの終点から伸ばした直線とする。
【0175】
23005は、物理的なモータの現実速度プロファイルを表している。理想位置プロファイル23001を入力としてフィードバック制御をかけていき、理想速度プロファイル2004に対して若干の遅れを出しつつも、位置決め制御領域2014が進むに従って理想速度に近づき、最終的な停止直前速度としては位置決め精度性能を達成できる速度V_APPROACHに収束するよう制御される。なお、減速制御領域2013から位置決め制御領域2014への移行は、物理的な駆動速度状態に関わらず、S_APPROACHに達した瞬間に行われるものとする。
【0176】
S_DECは定速制御領域2012が終了して減速制御領域2013が開始される位置を示しており、あくまでも理想位置プロファイル23001によって決定づけられる値であるため、現実の駆動における外乱の影響とは無関連である。
【0177】
図中のS_APPROACHは減速制御領域2013が終了して位置決め制御領域2014が開始される位置を示しており、S_STOPは停止位置を示している。T_ADDは加速制御領域2011に費やされる所要時間であり、T_DECは減速制御領域2013に費やされる所要時間である。T_FLATは定速制御領域2012に費やされる時間であり、駆動開始位置を0としたときの停止位置S_STOP、すなわち総駆動距離を満足する理想位置プロファイル23001を設定した時点で決定する固定値である。
【0178】
T_APPROACHは位置決め制御領域2014に費やされる時間であり、駆動制御対象が実際に動いたときに、位置決め制御領域2014に突入する位置S_APPROACHから停止位置S_STOPまでの距離S_APR_STOPを移動するのに要する時間である。図23では、位置決め制御領域2014において駆動制御対象がほぼ理想速度通りに動いた場合を示しているが、現実の制御において理想通りの物理的動作は一般的に大変困難である。
【0179】
高速かつ高精度の位置決めを行うために、理想位置プロファイル23001のカーブをその系に適合するようにチューニングする必要がある。具体的には、定速制御領域2012の速度は、位置決め所要時間を短縮するために系の性能の許す限り速く、位置決め制御領域2014の速度は、位置決め精度の向上を実現するために系の性能の許す限り遅く、さらに加速制御領域2011、減速制御領域2013、及び位置決め制御領域2014の距離は、位置決め所要時間を短縮するために系の性能の許す限り短くなるように、理想位置プロファイル23001を設定することが望ましい。
【0180】
しかしながら、このようなチューニングの詳細な手法については本発明の主題ではないので、ここではすでに理想位置プロファイル23001が最適に調整されているものとして説明する。
【0181】
t_approachは、現実の駆動を想定した場合に外乱によってあらゆる値に変化する現実の値として、位置決め制御領域2014に費やされる時間を表す変数である。
【0182】
なお、本実施形態においても上記実施形態と同様に、定数値を英大文字、変数値を英小文字で示している。同一スペリングの値について英大文字、英小文字の表記がある場合、英大文字で示された値は理想定数値であり、英小文字で示された値は同じ内容の値について変化しうる変数値を示している。
【0183】
図24は、積分補償量の初期値を0とした場合に起こる制御の弊害を、最悪の例を用いて簡略に示したものである。
【0184】
図24における現実速度プロファイル23005は、静止摩擦力に打ち勝って動きうる積分補償量に達するまでに、時間t_problemを要している。ここでようやく動き出すが、今度はt_problemまでの時点で過剰に大きくなってしまった位置の偏差を小さくするために、位置サーボのフィードバックが大きくかかり、現実速度プロファイル23005は、理想速度プロファイル2004を大きく超えてしまう。
【0185】
やがて位置の偏差が少なくなるにつれて速度は落ちてくるが、対象となる系に対して最適調整されたプロファイルから完全に逸脱しているため、停止位置に近づいても速度が充分に落ちきらない。結果的に、本来は時間T_DECを要して、V_APPROACHに近い速度で到達すべき位置S_STOPに、時間T_DECが経過する前に速すぎる速度v_badで突入してしまうこととなる。この結果オーバーランが発生してs_stopを行き過ぎてしまい、要求される精度が満たせなくなってしまう。
【0186】
図25は、本実施形態における駆動制御処理を説明するフローチャートであり、図26は、図25の各処理に関わる信号の状態を速度プロファイルと共に同じ時間軸上に示したタイミングチャートである。
【0187】
ステップS25011でパワーオンがなされると、ステップS30000でこれから搬送しようとしている記録媒体の種類を表す情報を格納する変数prtmedia_nowを、未定であることを意味する定数PRTMEDIA_UNKOWNで初期化する。
【0188】
次に、ステップS25054で、本実施形態の特徴であるところの積分補償量初期値を検出する処理が起動される。
【0189】
まず、ステップS25051において、積分補償量の初期値を表す変数init_integral_spdを0で初期化する。本実施形態においてこの値を0で初期化するのは、ステップS25051だけである点が重要である。また、ステップS25051においては、更に後続のシーケンスで使用されるLFモータの送りテーブルを選択している。本実施形態装置においては、ここで選択されるテーブルは低速駆動テーブルであり、一定速度v_testでの速度サーボによる駆動を選択するものとする。
【0190】
なお、速度v_testの設定値は、検出せんとする初期積分補償量の値に直接かかわるものであり、系に適切なチューニングの上で定められることが望ましいが、たとえば図23におけるV_APPROACHを使用することが考えられる。
【0191】
ステップS25051の処理が終了すると、該当するテーブルによる駆動の処理が、ステップS25052で行われる。ステップS25052内の各処理は、図26においても説明されている。
【0192】
具体的には、ステップS25001で駆動制御処理が開始されると、ステップS25002で駆動制御準備処理が行われる。ここで、積分補償量の初期値init_integral_spdを、実際にフィードバック制御で使用するワーク領域integral_spdに代入する。ステップS25002は、一般的にモータ制御タスクに記述される処理であり、integral_spdの設定の他に、駆動目的に適したテーブルの選択、駆動量に合致したT_FLATの設定、本発明の主題である評価手段の結果を次回の駆動で使用する理想速度プロファイルに反映させる反映処理、及び各種ワーク領域の設定を行い、最後にタイマ割り込み処理を司るタイマに起動をかけて終了する。
【0193】
ステップS25002でタイマが起動されると、ステップS25003で示された実駆動処理に移行する。この処理は、一般的にタイマ割り込み処理内に記述される処理であり、たとえば1msec毎に1回の割り込みを行い、エンコーダの値を読み出し、PID演算等により出力すべき電流の値を算出し、モータに対して算出した値を出力するものである。
【0194】
ステップS25003の処理と並行して、システムにおいては停止位置S_STOPに到達したかどうかの監視が行われており、到達が検知されると駆動目標位置への到達検知処理ステップS25004が起動されて割り込みが発生し、ステップS25005の駆動制御終了処理へ移行する。
【0195】
ステップS25005においては、モータに対する出力をいち早くディセーブルにしてからタイマを停止し、ステップS25006で処理を終了する。
【0196】
ステップS25006の駆動制御終了処理を終了すると、ステップS25053に進み、最適積分補償量初期値の解析を行う。
【0197】
以上のようにしてステップS25054の積分補償量初期値検出手段を終了すると、ステップS30001に進み、駆動命令の待機状態となる。プリンタシステムで、給紙、印刷、排紙等の動作が発生する度に、紙送りの駆動命令が発行され、これを受信してステップS30002に処理は進む。
【0198】
ステップS30002では、すでに搬送ローラ上に記録媒体があるか否かを判定し、ある場合にはステップS30003に進み、ない場合にはステップS30012に進んで駆動制御を開始する。
【0199】
本実施形態装置においては、記録媒体の種類に適した最適な積分補償量初期値を得ることを意図しており、記録媒体が搬送ローラ上にある状態でステップS25054の積分補償量初期値検出処理を実行することで、該記録媒体に適したより厳密な搬送処理を実現するものである。従って、給紙処理実行前で、まだ搬送ローラ上に記録媒体がない状態では、ステップS30003以降の処理を行っても効果がないことから、それらの処理をスキップしてステップS30012に進むべく、ステップS30002の処理で分岐するようにしている。
【0200】
なお、給紙の場合紙送り中に記録媒体が搬送ローラ上に引き込まれるため搬送負荷は変化してしまうが、この場合に要求される搬送制御の精度は記録実行中における精度よりも低くてよいため、いきなりステップS30012に進んでも装置としては特に問題はない。
【0201】
ステップS30003では、これから搬送しようとしている記録媒体の種類を識別し、普通紙であればステップS30004に進み、厚紙であればステップS30005に進み、CD−RトレイであればステップS30006に進む。記録媒体の種類の識別は、たとえばホストコンピュータから送信されるコマンドを解析することなどによって容易に行うことができる。
【0202】
普通紙であると判定された場合、ステップS30004では、直前の駆動を行ったときの搬送記録媒体を表す情報が格納されている変数prtmedia_nowを参照し、該変数の値がこれから搬送しようとしている普通紙と同じであれば、ステップS30012に進んで駆動制御を開始し、普通紙でないならばステップS30007に進む。
【0203】
ステップS30007では、変数prtmedia_nowに、普通紙を意味する定数PRTMEDIA_NORMALを代入し、ステップS30010へ進んでステップS25054の積分補償量初期値検出処理と同様の処理を再度行う。
【0204】
ここで、記録媒体を保持した状態でステップS30010の処理を行ってしまったため、記録媒体が搬送されているため、搬送した距離だけ戻すためにステップS30011で搬送ローラを逆転させる戻し処理を行う。このあとステップS30012に進んで駆動制御を開始する。
【0205】
厚紙と判定された場合、ステップS30005で、直前の駆動を行ったときの記録媒体を表す情報が格納されている変数prtmedia_nowを参照し、該変数の値がこれから搬送しようとしている厚紙と同じであればステップS30012に進んで駆動制御を開始し、厚紙でないならばステップS30008に進む。
【0206】
ステップS30008では、変数prtmedia_nowに、厚紙を表す定数PRTMEDIA_SPECIALを代入し、ステップS30010へ進んでステップS25054の積分補償量初期値検出処理と同様の処理を再度行う。
【0207】
また、CD−Rトレイと判定された場合、ステップS30006で、直前の駆動を行ったときの記録媒体を表す情報が格納されている変数prtmedia_nowを参照し、該変数の値がこれから搬送しようとしているCD−Rと同じであればステップS30012に進んで駆動制御を開始し、CD−RでないならばステップS30009に進む。
【0208】
ステップS30009では、変数prtmedia_nowに、CD−Rを表す定数PRTMEDIA_CDRを代入し、ステップS30010へ進んでステップS25054の積分補償量初期値検出処理と同様の処理を再度行う。
【0209】
ステップS30012では、用途に見合った該当する駆動テーブルを選択し、ステップS30013で駆動処理を行い、駆動処理が終了するとステップS30001に戻り、駆動命令の待機状態となる。
【0210】
図27は、ステップS25003の実駆動処理で行われる処理について、特に本発明の特徴となる速度のPI演算部分の詳細に着目して示したフローチャートである。ステップS25003で行われる処理全体に関しては、位置サーボ時には位置のP演算、また速度サーボのループにおけるD演算等、他にもさまざまな処理が行われるが、これらの処理は本発明の特徴となるものではなく、また公知の技術であることから説明を省略する。
【0211】
ステップS25003で実駆動処理が起動されると、まずステップS25101でエンコーダ速度情報変換手段6006により現在速度を得てv(tx)に代入する。ここでは説明の簡略化のため、図4における6007の微分演算、図5における7003の微分演算に関しては無視して説明を進める。なお、txは、該当する時刻を示している。
【0212】
次にステップS25102で、理想速度プロファイルの実値v_ideal(tx)と、v(tx)の差をとってv_differenceに代入する。v_ideal(tx)は、速度サーボ時には、純粋に速度理想プロファイルの値そのものとなるが、図4で説明した位置サーボ時には6002のP演算の結果を使用することになる。
【0213】
本実施形態において、ステップS25054の処理の実行時には、v_ideal(tx)にはv_testを適用するものとする。この場合、v_ideal(tx)は時刻の変化には依存しない一定値である。
【0214】
ステップS25103で、積分ゲインとして予め設定した定数値INTEGRAL_PARAMによって、txにおける積分補償量integral_spdを算出する。これが一般的に積分演算と呼ばれるものである。
【0215】
ステップS25104で、比例ゲインとして予め設定した定数値PROPORTION_PARAMによって、最終的な出力電流値ourput_pwmを算出する。これが一般的に比例演算と呼ばれるものである。
【0216】
ステップS25105で、演算結果を駆動対象に対して出力し、ステップS25106で、該当時刻txにおける積分補償量integral_spdを、配列mem_integral_spd[tx]に格納する。配列mem_integral_spd[tx]は、ステップS25053において使用される情報を格納しておくための領域である。
【0217】
そして、ステップS25107で、時刻を示すカウンタtxをインクリメントして、ステップS28008で処理を終了する。
【0218】
図28は、ステップS25054の積分補償量初期値検出処理が起動された場合における駆動の様子を速度プロファイルと共に示すタイミングチャートである。
【0219】
速度指令値はv_testで固定されており、一方積分補償量integral_spdは0から開始されるため、現実速度プロファイル2005は、時刻0からやや遅れて経ち上がる。その後、一定の時間における速度は、v_testに対して上下に振幅するが、やがてv_testに収束する。
【0220】
本実施形態においては、該条件においてv_testに対する現実速度プロファイルの上下の振幅が、許容可能なレベルに収束することが予想される時間をT_SAMPLING_STARTとし、この時刻から後の積分補償量を、ステップS25053の最適積分補償量初期値解析処理において使用する。なお、T_SAMPLING_ENDは、ステップS25053の最適積分補償量初期値解析処理において使用するデータの最後尾を示す時刻である。
【0221】
後述するようにステップS25053の最適積分補償量初期値解析処理では、T_SAMPLING_STARTからT_SAMPLING_ENDまでの時間に記録された積分補償量の平均をとるため、この区間において速度が多少上下していても、本実施形態の効果を妨げるものではない。速度0からv_testに到達するまでの立ち上りに要する時間領域を、T_SAMPLING_STARTによってカットできれば、本実施形態の効果は充分期待できるものである。
【0222】
図29は、ステップS25053の最適積分補償量初期値解析処理の詳細を示すフローチートである。
【0223】
まずステップS25201で、データのアクセスに用いるカウンタtxを初期化し、合計値を算出するためのワーク領域sum_integral_spdを初期化する。
【0224】
ステップS25202、S25203、S25204により、T_SAMPLING_STARTからT_SAMPLING_ENDまでの時間に記録された積分補償量の合計を取得する。そしてステップS25205で、該積分補償量の平均値を算出し、init_integral_spdに代入して処理を終了する。
【0225】
以上述べてきた処理により、積分補償量の初期値は、v_testによる一定速度の駆動を行ったときの定速駆動中の積分補償量の初期値となる。v_testで一定速度の駆動を行いうる積分補償量であるということは、静止摩擦に打ち勝って動くだけの出力電流値に対応する値であるということを意味している。
【0226】
従って、本実施形態による駆動制御を図24に示した駆動と比較すると、時刻0において既に出力電流値が静止摩擦に打ち勝って動き出すに足る値となっているため、静止時間t_problemを短縮することができ、より高速で正確な制御を期待することができる。また、v_testをV_APPROACHに設定しておくことにより、この状態で検出された積分補償量の初期値が、V_FLATに対して速度のオーバーシュートを誘発する危険性は非常に低くなる。
【0227】
更に、積分補償量の検出を、ステップS30003〜S30010に示した処理により記録媒体ごとに個別に行うことで、使用する記録媒体の特性の違いによる悪影響を回避でき、最適な駆動制御を実現することができる。
【0228】
[他の実施形態]
上記で説明した第1から第3の実施形態はそれぞれ単独で実施してもよいし、2つ以上を組合せて実施してもよい。
【0229】
以上の実施形態は、シリアル式インクジェットプリンタの記録紙搬送用(ラインフィード;LF)モータの制御に本発明を適用したものであるが、本発明は、インクジェットプリンタに限らず、モータを使用する様々な機器に適用可能である。
【0230】
また、上記の実施形態はいずれもDCモータの制御に本発明を適用したものであるが、DCモータ以外でも上記の追値制御等のフィードバック制御が可能なモータであれば、本発明を適用できる。
【0231】
本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読出し実行することによっても、達成されることは言うまでもない。
【0232】
この場合、記憶媒体から読出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。
【0233】
プログラムコードを供給するための記憶媒体としては、例えば、フロッピディスク,ハードディスク,光ディスク,光磁気ディスク,CD−ROM,CD−R,磁気テープ,不揮発性のメモリカード,ROMなどを用いることができる。
【0234】
また、コンピュータが読出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているOS(オペレーティングシステム)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0235】
さらに、記憶媒体から読出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0236】
本発明を上記記憶媒体に適用する場合、その記憶媒体には、先に説明した(図11、13〜15、20、22、25、27、29に示す)フローチャートに対応するプログラムコードが格納されることになる。
【0237】
【発明の効果】
以上説明したように本発明によれば、例えば、機構の駆動が所定時間以上行われていないタイミング、機器に関する情報が所定の範囲内にないと判定されたタイミング、前回の駆動時と機構によって搬送される負荷の種類が変化したと判定されたタイミング等のタイミングで、パラメータの値をデフォルト値に戻し、駆動条件や対象が異なった場合に、パラメータの値が引き継がれることによって生じる不具合を防止することができる。
【0238】
従って、起動した後にも所定のタイミングでパラメータの設定を変更し、使用される記録媒体や環境が変化した場合においても高速かつ高精度な位置制御が可能となる。
【図面の簡単な説明】
【図1】DCモータを定速で駆動した場合の速度変動を簡略に示したグラフである。
【図2】DCモータにおいて用いられる理想位置プロファイル追値制御、理想速度プロファイル追値制御を例にして、コギングによるトルク変動の及ぼす影響を説明するための図である。
【図3】本発明の実施形態に係るシリアル式インクジェットプリンタの全体図である。
【図4】図3のプリンタの制御構成を説明するブロック図である。
【図5】図4に示したプリンタコントローラの詳細構成を説明するブロック図である。
【図6】一般的なDCモータの位置サーボによる制御手順を示すブロック図である。
【図7】一般的なDCモータの速度サーボによる制御手順を示すブロック図である。
【図8】コギングによるトルク変動の及ぼす影響と制御について詳細に説明するための図である。
【図9】コギングによるトルク変動の及ぼす影響と制御について詳細に説明するための図である。
【図10】コギングによるトルク変動の及ぼす影響と制御について詳細に説明するための図である。
【図11】第1の実施形態における駆動制御処理を説明するフローチャートでである。
【図12】図11の各処理に関わる信号の状態を速度プロファイルと共に同じ時間軸上に示したタイミングチャートである。
【図13】図11の駆動制御準備処理で行われる動作を示すフローチャートである。
【図14】図11の実駆動処理で行われる動作を示すフローチャートである。
【図15】図11の駆動制御終了処理で行われる動作を示すフローチャートである。
【図16】図9に、コギングによるトルク変動を明示した現実速度プロファイルの曲線を追加したグラフである。
【図17】図15のステップS15007の処理が行われた後の駆動状態を示したグラフである。
【図18】図10に、コギングによるトルク変動を明示した現実速度プロファイルの曲線を追加したグラフである。
【図19】図15のステップS15007の処理が行われた後の駆動状態を示したグラフである。
【図20】改善係数に代入される変数の設定処理を示すフローチャートである。
【図21】搬送部の機械的構成を概略的に示す図である。
【図22】第2の実施形態における駆動制御処理を説明するフローチャートでである。
【図23】第2の実施形態におけるモータの制御において外乱の及ぼす影響と実際の制御との関係を図8と同様に示した図である。
【図24】積分補償量の初期値を0とした場合に起こる制御の弊害を、最悪の例を用いて簡略に示した図である。
【図25】第3の実施形態における駆動制御処理を説明するフローチャートである。
【図26】図25の各処理に関わる信号の状態を速度プロファイルと共に同じ時間軸上に示したタイミングチャートである。
【図27】実駆動処理で行われる処理について、速度のPI演算部分の詳細に着目して示したフローチャートである。
【図28】積分補償量初期値検出処理が起動された場合における駆動の様子を速度プロファイルと共に示すタイミングチャートである。
【図29】最適積分補償量初期値解析処理の詳細を示すフローチートである。
【符号の説明】
101 インクタンクを有する記録ヘッド
102 記録ヘッド101を搭載するキャリッジ
103 ガイドシャフト
104 ベルト
105 駆動モータ
106 給紙ベース
107 用紙搬送用モータ
108 モータギア
109 搬送ローラギア
110 搬送ローラ
111 ピンチローラ
114 シャーシ
115 記録用紙
116 ロータリーエンコーダフィルム
117 エンコーダセンサ
231 ホストインターフェース
401 プリンタ装置のプリンタ制御用のCPU
402 ROM
403 RAM
404 プリンタヘッド
405 モータを駆動するモータドライバ
406 プリンタコントローラ
407 サーミスタ等で構成される温度センサ
501 I/Oレジスタ
502 受信バッファコントローラ
503 記録バッファコントローラ
504 メモリコントローラ
505 プリントシーケンスコントローラ
1001 V_xで駆動したときの速度変動
1002 2*V_xで駆動したときの速度変動
1003 8*V_xで駆動したときの速度変動
1004 モータ自身が高速で回転してしまう位相角に対応するポイント
1005 モータ自身が低速で回転してしまう位相角に対応するポイント
2003 理想位置プロファイル
2004 理想速度プロファイル
2011 加速制御領域
2012 定速制御領域
2013 減速制御領域
2014 位置決め制御領域
2003 理想位置プロファイル
2004 理想速度プロファイル
2005 物理的なモータの現実駆動速度プロファイル
2006 実際の現実速度プロファイル
2007 実際の現実速度プロファイル
6001 理想位置プロファイル
6005 エンコーダセンサ
6009 エンコーダ位置情報変換手段
6006 エンコーダ速度情報変換手段
6002 位置サーボのメジャーループ
6003 PI演算
6007 微分演算
6004 DCモータに与えるエネルギー
6008 外乱
7001 理想速度プロファイル
7002 PI演算
7003 微分演算
8001 理想位置プロファイル
8003 現実位置プロファイル
8005 物理的なモータの現実駆動速度プロファイル
8006 仮想の理想位置プロファイル
9001 仮想減速制御領域
9003 現実位置プロファイル
9005 物理的なモータの現実駆動速度プロファイル
10003 現実位置プロファイル
10005 物理的なモータの現実駆動速度プロファイル
20001 ピンチローラばね
20003 普通紙
21003 CD−Rトレイ
[0001]
BACKGROUND OF THE INVENTION
  The present invention relates to a motor control method.The motorControl device, Electronic equipment and recording deviceIn particular, using a motor as a power sourceMove driven objectIt relates to control when doing.
[0002]
[Prior art]
Currently, motors are used as a power source for various devices. Especially, DC motors are simple in structure, do not require maintenance, have little rotation unevenness and vibration, and are capable of high-speed and high-precision control. Therefore, it is widely used for OA equipment and household appliances.
[0003]
In recent years, printers for general consumer use have a high ratio of being used at home. Therefore, improvement in image quality and reduction in operation sound are desired. Noise generated during operation includes noise generated during recording and that generated when the mechanism portion is driven. In an ink jet recording apparatus that generates few noise sources during recording, the noise is generated when the mechanism portion is driven. The generated noise will be reduced.
[0004]
The main mechanism part of the ink jet recording apparatus includes a recording head scanning mechanism and a recording medium transport mechanism, and a DC motor and a linear encoder are used as driving means for the recording head scanning mechanism to reduce noise. Realized. Today, in addition to this, a DC motor and a rotary encoder are increasingly used as a drive unit of a recording medium conveyance mechanism.
[0005]
From the viewpoint of noise reduction, the effect can be expected by adopting a DC motor, but from the viewpoint of increasing the accuracy of recording medium conveyance, more advanced position control is required in addition to mechanical accuracy.
[0006]
As a DC motor position control method, basically, when the rotation (angle) of the roller reaches a target position, the motor power is turned off and the motor is stopped by inertia.
[0007]
In order to ensure the accuracy of the stop position in a mechanism using a DC motor, it is indispensable to reduce the speed before the stop and eliminate the disturbance torque before the stop, that is, stabilize the low speed operation immediately before the stop. By turning off the power supply of the motor in a state where the speed is constant, it is possible to stabilize the establishment time until the stop and the accuracy of the stop position.
[0008]
In a configuration using such a DC motor, it is necessary to reduce torque fluctuation as much as possible in order to perform highly accurate control.
[0009]
The torque fluctuation with a large period can be controlled because the disturbance torque can be eliminated by feedback control represented by generally known PID control. However, the torque fluctuation with a small period represented by cogging can be controlled. It is difficult to control because it is caused by the motor itself to be controlled and the frequency that can be solved by the above feedback control may be exceeded during high-speed driving.
[0010]
The torque fluctuation due to cogging of the DC motor will be described below with reference to FIGS.
[0011]
FIG. 1 is a graph schematically showing fluctuations in speed when a DC motor is driven at a constant speed. The horizontal axis indicates time, and the vertical axis indicates speed. Reference numeral 1001 denotes a speed profile when driving at a speed (V_x) assumed as a reference speed, reference numeral 1002 denotes a speed profile when driving at twice the reference speed (2 * V_x), and reference numeral 1003 denotes a reference speed. The speed profiles when driving at 8 times (8 * V_x) are shown.
[0012]
Here, torque fluctuation occurs due to cogging of the motor itself, which the DC motor has as an inevitable characteristic due to the operating principle, and periodic speed fluctuation occurs. Since this periodic speed fluctuation is caused by the characteristics of the motor itself, it always occurs at every moving distance corresponding to a certain rotation angle, and therefore, the higher the speed, the higher the frequency.
[0013]
1004 indicated by ● in the figure indicates a point corresponding to a phase angle at which the motor itself rotates at a high speed due to the influence of torque fluctuation due to cogging. Further, 1005 indicated by ■ in the figure indicates a point corresponding to a phase angle at which the motor itself rotates at a low speed due to the influence of torque fluctuation due to cogging.
[0014]
In this way, if it is driven at a speed 2 * V_x that is twice the reference speed V_x, the speed fluctuation will occur at twice the frequency, and if it is driven at the speed 8 * V_x that is eight times the speed fluctuation will occur at an eight times frequency. To do.
[0015]
Next, the effect of torque fluctuation due to cogging in actual driving will be described.
[0016]
FIG. 2 is a diagram for explaining the influence of torque fluctuation due to cogging, taking as an example ideal position profile additional value control and ideal speed profile additional value control used in a DC motor.
[0017]
In FIG. 2, the horizontal axis indicates time, the vertical axis 2001 indicates speed, and the vertical axis 2002 indicates position.
[0018]
Reference numeral 2003 denotes an ideal position profile, and reference numeral 2004 denotes an ideal speed profile for reaching the ideal position. The ideal speed profile 2004 includes four control areas, and includes an acceleration control area 2011, a constant speed control area 2012, a deceleration control area 2013, and a positioning control area 2014.
[0019]
In the ideal speed profile of 2004, V_START is the initial speed, and V_FLAT indicates the speed of the constant speed control region 2012. Further, V_APPROACH indicates the speed of the positioning control region, and V_PROMISE indicates the maximum speed immediately before the stop that must be observed in order to achieve positioning accuracy. v_stop is a speed immediately before the stop as an actual value that changes to any value due to a disturbance when an actual drive is assumed.
[0020]
V_APPROACH is required to be set to a sufficiently low value so that v_stop does not exceed V_PROMISE even if any speed fluctuation occurs in consideration of speed fluctuation in actual driving.
[0021]
In the example shown here, as will be described later, position servo is adopted in 2011, 2012 and 2013, and speed servo is adopted in 2014. The 2003 curve shown in the figure shows an ideal position profile during position servo, and shows an expected arrival position profile when operating with the ideal speed profile during speed servo. The curve 2004 shown shows an ideal speed profile during speed servo, and shows a required speed profile required to operate following the ideal position profile during position servo.
[0022]
Reference numeral 2005 denotes an actual driving speed profile of a physical motor when fluctuations at a high frequency due to cogging are averaged for easy comparison with the ideal speed profile 2004. When feedback control is performed using the ideal position profile 2003 as an input, there is a slight delay with respect to the ideal speed profile 2004. However, as the process proceeds to the positioning control area 2014, it approaches the ideal speed and immediately before the final stop. The speed converges to a speed V_APPROACH that can achieve positioning accuracy. Note that the transition from the deceleration control region 2013 to the positioning control region 2014 is performed at the moment when the position reaches S_APPROACH regardless of the physical driving speed state.
[0023]
The profile of 2005 can be achieved in reality when a motor that does not have torque fluctuation due to cogging is driven, such as an ultrasonic motor, but here a DC motor that has torque fluctuation due to cogging is driven. Therefore, the actual shape of the actual speed profile is the shape shown in 2006 or 2007 by adding the influence of torque fluctuation due to cogging to 2005.
[0024]
The profile of 2006 shows the case where the phase of the DC motor at the start of movement is opposite to the profile of 2007. Actually, not only these two patterns but also the phase at the start of movement of the DC motor, Various patterns may occur in which the positions of the point 1004 where the speed increases due to the torque fluctuation and the point 1005 where the speed decreases are shifted in time.
[0025]
S_APPROACH in the drawing indicates a position where the deceleration control region 2013 is shifted to the positioning control region 2014 as described above, and S_STOP indicates a stop position. T_ADD is a required time spent in the acceleration control area 2011, and T_DEC is a required time spent in the deceleration control area 2013. T_FLAT is the time spent in the constant speed control region 2012, and is a fixed value determined when the stop position S_STOP when the movement start position is set to 0, that is, the ideal position profile 2003 for the total movement distance is set.
[0026]
T_APPROACH is the time spent in the positioning control area 2014, and is the time required to move the distance S_APR_STOP from the position S_APPROACH to the positioning control area 2014 to the stop position S_STOP when the control object actually moves. In 2005 shown in this figure, the case where the object to be controlled moves in the positioning region at an ideal speed is shown as a model. However, in actual control, an ideal physical operation is generally very difficult.
[0027]
In order to perform high-speed and high-accuracy positioning, it is necessary to tune the curve of the ideal position profile 2003 so as to fit the system. Specifically, the speed of the constant speed control area 2012 is as fast as the system performance allows to shorten the time required for positioning, and the speed of the positioning control area 2014 is the system performance to improve the positioning accuracy. The ideal position profile 2003 is set so that the distance between the acceleration control area 2011, the deceleration control area 2013, and the positioning control area 2014 is as short as the system performance permits in order to shorten the time required for positioning. It is desirable to do.
[0028]
However, since such a detailed method of tuning is not the subject of the present invention, it is assumed here that the ideal position profile 2003 has already been optimally adjusted.
[0029]
As described above, 2006 and 2007 indicate physical motor speed profiles when the same control is performed using a DC motor having torque fluctuation due to cogging as described with reference to FIG. In general, the curve is similar to the actual speed profile 2005 in an ideal motor, but there is a speed fluctuation due to the influence of torque fluctuation due to cogging, so the speed at the moment of transition to the positioning control region 2014 is the target speed. Compared to V_APPROACH, it is faster in 2006 and slower in 2007.
[0030]
Due to this influence, in the profile indicated by 2006, the speed at the moment of reaching the stop position S_STOP exceeds V_PROMISE. At this speed, the stop condition required for the apparatus cannot be satisfied, so the accuracy of the stop position is not guaranteed and the stop position may be overrun.
[0031]
On the other hand, in the profile shown in 2007, since the average speed in the positioning control region 2014 is low, the time required to actually reach the stop position S_STOP is longer than T_APPROACH, and the required time becomes long. Occurs.
[0032]
In order to solve the problem of the stop position in the profile of 2006, it can be easily dealt with by lowering the speed at the time of shifting to the positioning control region below the default value V_APPROACH. However, this further exacerbates the problem that the required time becomes longer when the profile shown in 2007 is obtained due to the phase of the motor at the start of movement.
[0033]
Conversely, in order to solve the problem of the required time in 2007, it can be easily dealt with by increasing the speed at the time of shifting to the positioning control region from the default value V_APPROACH. However, this further exacerbates the problem that the accuracy of the stop position is not guaranteed when the profile shown in 2006 is obtained due to the phase of the motor at the start of movement.
[0034]
Furthermore, there is a period in the cogging of the DC motor, but it is difficult to detect this period quantitatively and accurately. In the figure, it is approximately indicated by a sine curve, but actual torque fluctuation varies from individual to individual, and has various characteristics that cannot be expressed by a sine curve. For this reason, the characteristics of torque fluctuation are not the same even for the same type and model number, and there is no curve (profile) that can be applied universally and universally to all motors.
[0035]
It is also conceivable to control the logical position information read from the encoder in association with the phase angle when the period of torque ripple due to cogging is considered to be 360 degrees. In this case, each time the apparatus is powered off. Since the logical position information is initialized, whether the speed at the stop position when moving after the device is powered on will eventually exceed the target speed as shown in 2006 is shown in 2007 Thus, it is difficult to predict and control in advance whether the speed will eventually become less than the target speed.
[0036]
As described above, it is practically very difficult to set the target speed (V_APPROACH) in the positioning control region in accordance with the cogging characteristics of the DC motor to be used and achieve high-precision and high-speed position control.
[0037]
In order to solve this problem, when each drive is performed, an ideal profile of the drive is created according to the target position and preset initial parameters, the motor drive is controlled according to this profile, and the end of each drive is determined. Japanese Patent Application No. 2001-148341 proposes an invention in which the value of the initial parameter is evaluated and the value of the initial parameter is changed according to the result of the evaluation.
[0038]
[Problems to be solved by the invention]
In recent years, it has been desired to record on a wide variety of recording media of different materials and sizes, and in the recording apparatus, the transport mechanism and its motor need to be appropriately controlled according to the type of the recording medium that is the object to be controlled. There is.
[0039]
In order to cope with such a problem, Japanese Patent Application No. 2001-148344 discloses a command value to a motor necessary for starting the mechanism by monitoring the movement of the mechanism during preliminary driving. An invention that enables high-speed and high-accuracy position control regardless of individual differences in frictional force of the object to be controlled and the mechanism part or differences in use environment by using this command value as the initial value of the drive parameter. Proposed.
[0040]
However, in the invention described in the above Japanese Patent Application No. 2001-148344, the preliminary drive is performed only once after the power is turned on, and the same parameter is continuously used after the power is turned on once. Is done. The same applies to the invention described in Japanese Patent Application No. 2001-148341, and once it has been activated, the parameter values are inherited even if the type of recording medium used is changed.
[0041]
Furthermore, even if the environment such as temperature changes, the static frictional force of the mechanism part changes, so if the parameters are inherited, high-speed and highly accurate position control cannot be performed.
[0042]
The present invention has been made in view of the situation as described above. Even after startup, the parameter setting is changed at a predetermined timing, and even when the recording medium or environment to be used is changed, high speed and high accuracy are achieved. It is an object of the present invention to provide a motor control method and a control device that enable position control.
[0043]
[Means for Solving the Problems]
  In order to achieve the above object, a motor control method according to the present invention uses a motor as a power source.Rotate the transport roller that transports the transport objectA method of controlling a motor in a device,
  Drive the motorWhen the target position and presetPredetermined speed command valueAccording toA position profile that shows the relationship between time and position, and a velocity profile that shows the relationship between time and speedCreating a profile, and
  SaidpositionProfileAnd the speed profileDrive the motor according toIt is divided into an acceleration area, a deceleration area including an area in which the driven object starts decelerating after the acceleration area, and a positioning area until the stationary state is reached after the deceleration area.ControlDriveProcess,
A determination step of determining whether or not the type of the object to be transported has changed from the time of the previous transport by the drive step, based on a command input from the outside each time an instruction to start the drive step is received,
When it is determined in the determination step that the type of the conveyance object has changed, a preliminary drive that drives the motor to convey the conveyance object by rotating the conveyance roller by a speed servo according to the predetermined speed command value Monitoring the rotation of the transport roller in the preliminary drive, calculating the integral compensation amount corresponding to the current value output to the motor at the start of the acceleration region, and starting the preliminary drive of the transport object After performing the return drive that drives the motor to rotate the transport roller so as to return to the previous position, the drive step is performed reflecting the integral compensation amount, while the determination step includes When it is determined that the type of the object to be conveyed does not change, the control process that executes the driving process without executing the preliminary driving, the calculation of the integral compensation amount, and the return driving is performed. And,Is provided.
[0044]
  In addition, the motor control device of the present invention that achieves the above object uses the motor as a power source.Rotate the transport roller to transport the object to be transportedA motor control device
  Drive the motorWhen the target position and presetPredetermined speed command valueAccording toA position profile that shows the relationship between time and position, and a velocity profile that shows the relationship between time and speedProfile creation means for creating
  SaidpositionProfileAnd the speed profileDrive the motor according toIt is divided into an acceleration area, a deceleration area including an area where deceleration is started after the acceleration area, and a positioning area until the stationary area following the deceleration area.ControlDriveMeans,
A determination unit that determines, based on a command input from the outside, whether or not the type of the object to be transported has been changed from the time of the previous transport by the drive unit each time an instruction to drive by the drive unit is received;
When the determination means determines that the type of the transport object has changed, a preliminary drive that drives the motor to transport the transport object by rotating the transport roller by a speed servo according to the predetermined speed command value Monitoring the rotation of the transport roller in the preliminary drive, calculating the integral compensation amount corresponding to the current value output to the motor at the start of the acceleration region, and starting the preliminary drive of the transport object After performing the return drive that drives the motor to rotate the transport roller so as to return to the previous position, the execution means is made to reflect the integral compensation amount, while the determination means If it is determined that the type of the object to be transported does not change, the drive means does not execute the preliminary drive, the calculation of the integral compensation amount, and the return drive. And a control means for executing the dynamic,Is provided.
[0045]
  That is, in the present invention, a motor is used as a power source.Rotate the transport roller that transports the transport objectIn controlling motors in equipment,Drive the motorWhen the target position and presetPredetermined speed command valueAccording toA position profile that shows the relationship between time and position, and a velocity profile that shows the relationship between time and speedAnd drive the motor according to the profileIt is divided into an acceleration area, a deceleration area including an area in which the driven object starts decelerating after the acceleration area, and a positioning area until the stationary state is reached after the deceleration area.controlTo driveAndEach time the instruction to start the driving is received, it is determined whether the type of the transport object has changed from the previous transport based on a command input from the outside, and it is determined that the type of the transport object has changed. In this case, according to the predetermined speed command value, the transport roller is rotated by a speed servo to drive the motor so as to transport the transport object, and the rotation of the transport roller in the preliminary drive is monitored and the rotation is monitored. Calculation of an integral compensation amount corresponding to a current value output to the motor at the start of an acceleration region, and rotation of the transport roller so that the transport target is returned to a position before the preliminary drive is started. After performing the return drive that drives the vehicle, the drive is performed while reflecting the integral compensation amount, and when it is determined that the type of the conveyance object does not change, Without executing said return drive and pre-drive and the integral compensation amount calculation, performs control to perform the drive.
[0046]
  In this case, for example, the timing when the mechanism is not driven for a predetermined time or more, the timing when it is determined that the information about the device is not within the predetermined range, the time of the previous driving, and the mechanism are conveyed.Transport objectThe parameter value is returned to the default value at a timing such as the timing when it is determined that the type of the parameter has changed, and when the drive condition or target is different, it is possible to prevent problems caused by the parameter value being taken over. .
[0047]
Therefore, even after the activation, the parameter setting is changed at a predetermined timing, and high-speed and high-accuracy position control can be performed even when the recording medium or environment used is changed.
[0048]
DETAILED DESCRIPTION OF THE INVENTION
DESCRIPTION OF EXEMPLARY EMBODIMENTS Hereinafter, preferred embodiments of the invention will be described in detail with reference to the drawings. The embodiment described here is a serial ink jet printer equipped with a recording head having a removable ink tank, in which the motor control method of the present invention is applied to control of a line feed motor for conveying a recording medium. It is.
[0049]
<First Embodiment>
FIG. 3 is an overall view of the serial ink jet printer according to the first embodiment of the present invention. In the figure, 101 is a recording head having an ink tank, and 102 is a carriage on which the recording head 101 is mounted. A guide shaft 103 is inserted into the bearing portion of the carriage 102 so as to be slidable in the main scanning direction, and both ends of the shaft are fixed to the chassis 114. The drive of the drive motor 105 which is a carriage drive means is transmitted through the belt 104 which is a carriage drive transmission means engaged with the carriage 102, and the carriage 102 can move in the main scanning direction.
[0050]
During recording standby, the recording paper 115 is stacked on the paper supply base 106, and at the start of recording, the recording paper is supplied by a paper supply roller (not shown). In order to convey the fed recording sheet, the conveying roller is rotated via a gear train (motor gear 108, conveying roller gear 109) as a transmission means by a driving force of a sheet conveying motor (107) which is a DC motor, and a pinch is rotated. The recording paper 115 is conveyed by an appropriate feeding amount by the pinch roller 111 that is pressed against the conveying roller 110 by a roller spring (not shown) and rotates following the roller. Here, the carry amount is managed by detecting and counting the slits of the code wheel (rotary encoder film 116) press-fitted into the carry roller 109 with the encoder sensor 117, thereby enabling high-precision feeding.
[0051]
FIG. 4 is a block diagram illustrating a control configuration of the printer shown in FIG.
[0052]
In the figure, reference numeral 401 denotes a printer control CPU of the printer apparatus, which controls recording processing using a printer control program, printer emulation, and recording font stored in a ROM 402.
[0053]
A RAM 403 stores decompressed data for recording and data received from the host. Reference numeral 404 denotes a printer head, reference numeral 405 denotes a motor driver that drives a motor, and reference numeral 406 denotes a printer controller that performs access control of the RAM 403, exchange of data with the host device, and transmission of control signals to the motor driver. Reference numeral 407 denotes a temperature sensor composed of a thermistor or the like, which detects the temperature of the printer apparatus.
[0054]
The CPU 401 reads out information such as an emulation command sent from the host device to the printer device from the I / O data register in the printer controller 406 while performing mechanical / electrical control of the main body by the control program in the ROM 402, Is written to the I / O register and I / O port in the printer controller 406 and read out.
[0055]
FIG. 5 is a block diagram for explaining the detailed configuration of the printer controller 406 shown in FIG. 4. The same components as those in FIG. 4 are denoted by the same reference numerals.
[0056]
In the figure, reference numeral 501 designates an I / O register for exchanging data at the command level with the host. Reference numeral 502 denotes a reception buffer controller, which directly writes received data from the register to the RAM 403.
[0057]
A recording buffer controller 503 reads recording data from the recording data buffer of the RAM at the time of recording, and sends the data to the printer head 404. A memory controller 504 controls memory access in three directions with respect to the RAM 403. A print sequence controller 505 controls the print sequence. A host interface 231 manages communication with the host.
[0058]
FIG. 6 is a block diagram showing a control procedure (6000) by a position servo of a general DC motor. In the present embodiment, the position servo is used in the acceleration control region, the constant speed control region, and the deceleration control region. Such control of the DC motor is called PID (proportional integral and differential) control or classical control, and the procedure will be described below.
[0059]
First, the target position to be given to the control object is given in the form of an ideal position profile 6001. In the present embodiment, this corresponds to the absolute position where the paper conveyed by the line feed motor should reach at the corresponding time. This position information changes as time progresses. By performing the additional value control for the ideal position profile, the drive control of this embodiment is performed.
[0060]
The apparatus is provided with an encoder sensor 6005, which detects the physical rotation of the motor. The encoder position information converting means 6009 is means for accumulating the number of slits detected by the encoder sensor 6005 to obtain absolute position information. The encoder speed information converting means 6006 is a signal of the encoder sensor 6005 and a clock built in the printer. (Timer) is a means for calculating the current drive speed of the line feed motor.
[0061]
A numerical value obtained by subtracting the actual physical position obtained by the position information conversion unit 6009 from the ideal position profile 6001 is transferred to a position servo feedback process after 6002 as a position error that is insufficient with respect to the target position. Reference numeral 6002 denotes a position servo major loop, and generally means for performing a calculation related to the proportional term P is known.
[0062]
As a result of the calculation in 6002, a speed command value is output. This speed command value is passed to 6003 and subsequent speed servo feedback processes. The minor loop of the speed servo is generally a means that performs a PID calculation for calculating the proportional term P, the integral term I, and the differential term D.
[0063]
In the present embodiment, in order to improve the followability when a non-linear change in the speed command value occurs, and to prevent the adverse effect of the differential operation at the time of the follow-up control, a technique generally called a differential leading form is shown. The encoder speed information obtained by the encoder speed information conversion means 6006 is passed through the differential operation means 6007 before taking the difference from the speed command value obtained in 6002. This method itself is not the subject of the present invention, and depending on the characteristics of the system to be controlled, it may be sufficient to perform a differential operation in 6003.
[0064]
In the minor loop of the speed servo, the numerical value obtained by subtracting the encoder speed information from the speed command value is transferred to the PI operation circuit 6003 as a speed error that is insufficient with respect to the target speed, and the energy to be given to the DC motor at that time is Calculation is performed by a method called PI calculation. The motor driver circuit that has received it, for example, uses a means for changing the pulse width of the applied voltage (hereinafter referred to as “PWM (Pulse Width Modulation) control”) while changing the applied voltage duty while the motor applied voltage is constant. Then, the current value is adjusted, the energy given to the DC motor 6004 is adjusted, and the speed control is performed.
[0065]
The DC motor that rotates by being applied with a current value performs physical rotation while being affected by disturbance 6008, and its output is detected by the encoder sensor 6005.
[0066]
FIG. 7 is a block diagram for explaining a control procedure (7000) by a speed servo of a general DC motor. The same components as those in FIG. In this embodiment, the speed servo is used in the positioning control area. Such control of the DC motor is called PID control or classical control, and the procedure will be described below.
[0067]
First, a target speed desired to be given to the controlled object is given in the form of an ideal speed profile 7001. In the present embodiment, this is an ideal speed at which paper should be conveyed by the line feed motor at the corresponding time, and is a speed command value at the corresponding time. As time progresses, this speed information changes. Drive control of this embodiment is performed by performing additional value control on this ideal speed profile.
[0068]
In the speed servo, a means for performing a PID calculation for calculating a proportional term P, an integral term I, and a differential term D is generally used. In the present embodiment, in order to improve the followability when a non-linear change in the speed command value occurs, and to prevent the adverse effect of the differential operation at the time of the follow-up control, a technique generally called a differential leading form is shown. The encoder speed information obtained in 6006 is passed through the differential calculation means 7003 before taking the difference from the speed command value obtained in the ideal speed profile 7001. This method itself is not the subject of the present invention, and depending on the characteristics of the system to be controlled, it may be sufficient to perform the differential operation in 7002.
[0069]
In the speed servo, the numerical value obtained by subtracting the encoder speed information from the speed command value is transferred to the PI calculation circuit 7002 as a speed error that is insufficient with respect to the target speed, and the energy to be given to the DC motor at that time is referred to as PI calculation. It is calculated by a so-called method. The motor driver circuit receiving it performs, for example, PWM control, changes the duty of the applied voltage, adjusts the current value, adjusts the energy applied to the DC motor 6004, and performs speed control.
[0070]
The DC motor 6004 that rotates by applying a current value performs physical rotation while being affected by the disturbance 6008, and its output is detected by the encoder sensor 6005.
[0071]
8, 9, and 10 are diagrams for explaining the effects and control of torque fluctuation due to cogging described in FIG. 2 in more detail for each case.
[0072]
FIG. 8 shows a case where the velocity v_stop just before stopping ends with an average and ideal value V_APPROACH, FIG. 9 shows a case where v_stop> V_APPROACH, that is, the case where the velocity v_stop ends due to overspeed, and FIG. 10 shows that t_approach> T_APPROACH, that is, the case where the process ends when the time is exceeded is shown.
[0073]
Reference numeral 8001 denotes an ideal position profile, which is set for each of the areas 2011, 2012, and 2013 where position servo is performed, but is calculated only up to S_APPROACH. This is because the ideal position profile is unnecessary after S_APPROACH because it switches to speed servo after passing S_APPROACH. The deceleration required time T_DEC in 8001 is constant regardless of actual driving, and a control region corresponding to this is shown as an ideal deceleration control region 9001.
[0074]
Reference numerals 8003, 9003, and 10003 denote actual position profiles that take into account the influence of disturbances and the like in the drawings. Here, in order to clarify the object to be explained, the actual position profile of the physical motor is shown when the fluctuations at high frequencies due to cogging are averaged.
[0075]
In the position servo, a time delay always occurs. Therefore, the actual position profiles 8003, 9003, and 10003 have a delay with respect to the ideal position profile 8001. Therefore, even if the ideal position profile 8001 ends, the actual position generally does not reach S_APPROACH. In the present embodiment, the actual drive reaches S_APPROACH after 9001 ends. In this case, a virtual ideal position profile 8006 is substituted as a command position value to the position servo. The virtual ideal position profile 8006 is a straight line extended from the end point of the ideal position profile using the final inclination of the ideal position profile 8001.
[0076]
Similar to 2005, 8005, 9005, and 10005 represent the actual speed profile of the physical motor in the simplified concept in which fluctuations at high frequencies due to cogging are averaged in order to clarify the object of explanation. Here, the profiles are shown in consideration of the influence of disturbances and the like in each figure.
[0077]
Other parts similar to those in FIG. 2 are denoted by the same reference numerals as in FIG. However, the ideal time T_APPROACH spent in the positioning control region 2014, which was a constant value in FIG. 2, changes to any value in FIG. 8, 9, and 10 due to disturbance when an actual drive is assumed. As an actual value, an actual variable value t_approach is added as the time spent in the positioning control area 2014.
[0078]
In the description of the present embodiment, constant values are shown in uppercase letters and variable values are shown in lowercase letters. If there are uppercase and lowercase letters for the same spelling value, the value shown in uppercase letters is an ideal constant value, and the value shown in lowercase letters indicates a variable value that can change for the same content value. ing.
[0079]
S_DEC indicates the position at which the constant speed control area 2012 ends and the deceleration control area 2013 starts, and is a value determined by the ideal position profile 8001 to the last, and is thus unrelated to the influence of disturbance in actual driving. It is.
[0080]
As described above, FIG. 8 shows a case where the speed v_stop immediately before stop ends with an average and ideal value V_APPROACH, and v_stop <V_PROMISE and t_approach = T_APPROACH. Both meet the requirements.
[0081]
In addition, since FIG. 9 ends with v_stop> V_APPROACH, that is, when the speed is exceeded, the speed requirement just before stopping cannot be satisfied. Actually, the main cause of such driving is that the speed at the moment of reaching S_APPROACH is excessive due mainly to the influence of torque fluctuation due to cogging in the deceleration region, but the position of S_STOP is just the torque of the motor. A similar result can be obtained when the phase angle corresponds to the point 1004 where the speed increases due to the fluctuation.
[0082]
On the other hand, since FIG. 10 ends with t_approach> T_APPROACH, that is, when the time is exceeded, the requirement for the required drive time cannot be satisfied. Actually, the main cause of such a drive is that the speed has dropped much before reaching S_APPROACH mainly due to the influence of torque fluctuation due to cogging in the deceleration region, but the position of S_STOP is just the position of the motor. Similar results can be obtained when the phase angle corresponds to point 1005 where the velocity is slow.
[0083]
FIG. 11 is a flowchart for explaining the drive control process in the present embodiment, and FIG. 12 is a timing chart showing the state of signals related to each process of FIG. 11 on the same time axis together with the speed profile.
[0084]
When the power is turned on in step S11011, the process proceeds to step S11012, where V_APPROACH is set as v_approach and S_APR_STOP is set as s_apr_STOP as default values.
[0085]
In step S11101, initialization is performed by substituting 0 into a timer counter waittime_counter for counting the time that has passed without a drive command being issued.
[0086]
In step S11013, it is determined whether or not a drive command has been issued in the printer system. If a drive command has not been received, the process proceeds to step 11102 to perform standby processing. If a drive command has been received, step S11013 is performed to start drive control. The process proceeds to S11001.
[0087]
In step S11102, the timer counter waittime_counter is counted up, and in step S11103, the process waits for 5 msec. In step S11104, it is determined whether the value of the timer counter waittime_counter has reached the threshold value WAITTIME_LIMIT. The value of the threshold WAITTIME_LIMIT is a value corresponding to a time during which the environmental temperature, the motor heat storage state, and the like may change.
[0088]
If the value of waittime_counter is less than WAITTIME_LIMIT, the process returns to step S11013 to wait for a drive command again. On the other hand, if the value of waittime_counter is greater than or equal to WAITTIME_LIMIT, the process returns to step S11012, and v_approach and s_apr_STOP are returned to the default values.
[0089]
When the drive control process is started in step S11001, drive control preparation means is performed in step S11002. The processing performed here will be described later, but the outline is processing generally described in the motor control task. Selection of a table suitable for the driving purpose, setting of T_FLAT matching the driving amount, The process of reflecting the result of the evaluation means, which is the subject, in the ideal speed profile used in the next drive and setting of various work areas are performed, and finally the timer that controls the timer interrupt process is started and terminated.
[0090]
When the timer is started in step S11002, the process proceeds to the actual driving process shown in step S11003. This process is generally described in the timer interrupt process. For example, an interrupt is performed once every 1 msec, an encoder value is read, a current value to be output is calculated by PID calculation, and the like. A value calculated for the motor is output.
[0091]
In parallel with the processing in step S11003, the system monitors whether or not the stop position S_STOP has been reached. When arrival is detected, the arrival detection processing step S11004 to the drive target position is activated and an interrupt is generated. Occurs, and the process proceeds to the drive control end process of step S11005.
[0092]
In step S11005, the output to the motor is quickly disabled, the timer is stopped, the evaluation process that is the subject of the present invention is executed, and the process ends.
[0093]
By performing each of the above processes, one drive process reaches the end of the drive control in step S11006.
[0094]
FIG. 13 is a flowchart showing in detail the operation in the drive control preparation process of step S11002.
[0095]
In the drive control preparation process, a table suitable for the drive purpose and drive amount is selected, and v_approach, V_FLAT, T_DEC, s_apr_STOP, V_START, T_ADD, and T_FLAT of the table are acquired. In a serial printer device, it is common to have a plurality of types of tables for the line feed motor in order to increase the processing speed, reduce the noise, and control the synchronization with the paper feed motor. A selection shall be made. Here, a case where T_DEC is further stored in the variable area t_dec and S_DEC is stored in the variable area s_dec will be described.
[0096]
In step S13001, a feedback control gain setting suitable for the table is performed. The processing here is the same as the processing conventionally performed, and is not the subject of the present embodiment, so the description thereof is omitted.
[0097]
Step S13000 is an ideal position profile generation process, which is a process for generating an ideal position profile 8001, and details thereof will be described below.
[0098]
In step S13002, an acceleration drive profile is generated. The process performed here is the same as the process performed conventionally. For example, as an acceleration drive profile, a linear function or a cubic function with time as an input and speed as an output is used, and the outputs are added. A general method is to obtain a position profile.
[0099]
In step S13003, a constant speed drive profile is generated. The process performed here is the same as the process performed conventionally. For example, as a constant speed drive profile, a method of calculating a change in position when driven by V_FLAT is general.
[0100]
In step S13004, a deceleration drive profile is generated. This is a characteristic process of this embodiment, and will be described in detail below.
[0101]
In step S13005, the time value Tx is initialized, and s_dec that is the deceleration start position is set as the initial value of the ideal position S (Tx) that should reach the time Tx.
[0102]
In step S13006, an ideal speed V (Tx) at time Tx is calculated from a tertiary deceleration curve of speed. In the present embodiment, the third-order deceleration curve of speed can be obtained by the following equation. That is,
V (Tx) = (V_FLAT−v_approach) (2Tx−3t_dec) Tx2/ T_decThree+ V_FLAT
It is.
[0103]
As can be seen from this equation, the characteristic is that the curve can be flexibly changed following the change of v_approach. Of course, the deceleration curve used in the present invention is not limited to this third-order deceleration curve, and may be a curve represented by a first-order deceleration curve or other functions according to the suitability of the system, and the change in v_approach As long as the curve can reflect the above, the effect intended by the present invention can be enjoyed in any deceleration curve.
[0104]
In step S13007, V (Tx) can be added to S (Tx), thereby calculating an ideal position S (Tx + 1) to be reached at Tx + 1.
[0105]
In step S13008, Tx is incremented. In step S13009, the processes in steps S13006 to S13008 are repeated until the value of the counter Tx reaches a value t_dec which means the end of the ideal deceleration control region 9001, and calculation of V (Tx) and S (Tx) at each Tx. Is continued.
[0106]
When the above processing ends, the process proceeds to step S13010, where the time counter Tx added in the profile calculation is initialized again for actual control, and various settings for starting the timer are performed. Since the processing here is the same as that conventionally performed, description thereof is omitted.
[0107]
When the timer is started in step S13011, the drive control preparation process ends in step S13012.
[0108]
FIG. 14 is a flowchart showing the operation performed in the actual driving process of step S11003, and shows the process performed each time a timer interrupt occurs.
[0109]
When a timer interrupt occurs and step S11003 is activated, the process proceeds to step S14001, where the encoder position information conversion means 6009 obtains the current position and assigns it to S (Tx).
[0110]
Next, in step S14002, it is determined whether or not the positioning control area 2014 has been reached. If it has not yet reached, the process proceeds to step S14011, and if it has reached, the process proceeds to step S14005.
[0111]
In step S14011, it is determined whether or not the vehicle is within the ideal deceleration control region 9001, and if the vehicle is still within the region, the process proceeds to step S14003, and if the vehicle has deviated, the process proceeds to step S14012.
[0112]
In step S14003, the position information corresponding to the current time Tx is adopted as the ideal position profile from the position profile generated in the ideal position profile generation process 13000, and the process proceeds to step S14004.
[0113]
On the other hand, in step S14012, since it has already deviated from the region generated in ideal position profile generation processing step S13000, a straight line extended from the end point of the ideal position profile is obtained using the final inclination of the ideal position profile. It is generated and adopted as a virtual ideal position profile, and the process proceeds to step S14004.
[0114]
In step S14004, the position servo control 6000 shown in FIG. 6 is executed using the position command value obtained as described above, and the process proceeds to step S14007.
[0115]
In step S14005, v_approach is adopted as the ideal speed profile, and the value is used as a speed command value. In step S14006, the speed servo control 7000 shown in FIG. 7 is executed, and the process proceeds to step S14007.
[0116]
In step S14007, the current value of the calculation result is output to the motor, and the processing in the interrupt is terminated in step S14008.
[0117]
FIG. 15 is a flowchart for explaining the operation performed in the drive control end process of step S11005.
[0118]
If the output current is disabled and the timer is stopped in step S15001, the process proceeds to the evaluation process in step S15002. This evaluation process is a characteristic process in this embodiment, and will be described in detail below.
[0119]
First, in step S15021, the difference between the ideal value T_APPROACH and the actual t_approach is calculated and substituted into dif_approach, and the process proceeds to step S15003.
[0120]
studyPrm is an improvement coefficient for reflecting the degree of deviation of t_approach from the ideal value in v_approach in the next drive.
[0121]
In step S15003, dif_approach is compared with STUDY_T_HISPEEDLIMIT. If dif_approach is too small, the process proceeds to step S15011, where study_prm_emergency is adopted as studyPrm. On the other hand, if it is not too small, the process proceeds to step S15004 and study_prm_normal is adopted. Here, study_prm_emergency> study_prm_normal.
[0122]
This process assumes a case where t_approach is too short and reaches S_STOP without decelerating, and v_stop becomes high speed. In such a case, by adopting study_prm_emergency in step S15011, v_approach that is finally output in evaluation processing S15002 becomes lower by calculation in step S15007 described later. That is, it can be expected that t_approach in the next drive will be abruptly longer than when v_approach calculated by study_prm_normal is used, and the problem that the accuracy of the stop position cannot be guaranteed because v_stop becomes faster.
[0123]
If study_prm_emergency is adopted as studyPrm in any case, if t_approach is long, t_approach will be shortened more rapidly, resulting in an adverse effect that v_stop in the next drive becomes faster, but the determination in step S15003 In step S15004, the branch destination in such a state is set to study_prm_normal.
[0124]
In steps S15005 and S15006, the absolute value of dif_approach is compared with STUDY_T_INPUTLIMIT, and if the absolute value of dif_approach is large, the value is changed to ± STUDY_T_INPUTLIMIT which is the maximum limit value in step S15012 or S15013. This process is a process for suppressing the influence of sudden and maximal disturbance.
[0125]
As described above, steps S15003, S15011, S15004, S15005, S15006, S15012, and S15013 realize a very effective action in the calculation of v_approach in this embodiment.
[0126]
The purpose of these processes is v_stop> V_APPROACH, as described with reference to FIG. 9, that is, when the speed is over and the speed immediately before stop cannot be satisfied, and as described with reference to FIG. 10, t_approach> T_APPROACH In other words, it is to improve both the case where the time required for driving is not satisfied and the requirement for the driving time cannot be satisfied.
[0127]
Here, in the positioning control of the line feed motor, the guarantee of the stop position accuracy must be achieved in any situation, but the drive time is allowed if it is achieved on average and is within an allowable range. If it is not achieved, it will not be a problem.
[0128]
Therefore, when the speed v_stop immediately before stopping exceeds V_APPROACH, an immediate improvement is required. However, with regard to the required driving time, if there is a possibility that the improvement of v_stop is caused by the improvement, Even if the improvement effect is slow, it is necessary to proceed with caution. The processing in steps S 15003, S 15011, S 15004, S 15005, S 15006, S 15012, S 15013 takes this point into consideration.
[0129]
Step S 15007 is the most important process in the present embodiment, and forms the core of the evaluation process.
[0130]
That is, the difference dif_approach obtained by subtracting t_approach actually detected in the completed drive from the ideal T_APPROACH is multiplied by an appropriate coefficient studyPrm, and subtracted from the current v_approach to obtain v_approach used in the next drive. calculate.
[0131]
When the above process ends, the process ends in step S15008.
[0132]
Here, the effect | action by the process by step S15007 is demonstrated concretely below using FIG.16,17,18,19.
[0133]
FIG. 16 is a graph in which a curve 16006 of an actual speed profile in which torque fluctuation due to cogging is clearly shown is added to the graph showing the drive when v_stop is in an excess state in FIG. 9, and FIG. 17 shows the process of step S15007. It is the graph which showed the drive state after being performed.
[0134]
As described above, the main cause of the occurrence of such a drive is that the actual cause of such a drive is that the speed at the moment of reaching S_APPROACH is mainly due to the influence of torque fluctuation due to cogging in the deceleration region. A similar result can be obtained when the position of S_STOP is just the phase angle corresponding to the point 1005 where the speed increases due to the torque fluctuation of the motor, because it is excessive. FIG. 16 shows these two factors simultaneously for easy understanding.
[0135]
Here, in order to improve that the t_approach is too short, the process of step S 15007 decreases the average speed of the positioning control region 2014 by decreasing the next drive v_approach as shown in FIG. 17 and increases the t_approach. And v_stop are slowed down.
[0136]
FIG. 18 is a graph in which a curve 18006 of an actual speed profile in which torque fluctuation due to cogging is clearly shown is added to the graph showing driving when t_approach is in an excess state in FIG. 10, and FIG. It is the graph which showed the drive state after the process of was performed.
[0137]
As described above, the main cause of the actual occurrence of such driving is that the speed has dropped considerably before reaching S_APPROACH mainly due to the influence of torque fluctuation due to cogging in the deceleration region. A similar result can be achieved if the position is just the phase angle corresponding to point 100 where the motor speed slows down. FIG. 18 shows these two factors simultaneously for the sake of clarity.
[0138]
Here, in order to improve that t_approach is too long, the process of step S 15007 increases the average speed of the positioning control region 2014 by increasing v_approach of the next drive and decreases t_approach as shown in FIG. And v_stop speed up.
[0139]
FIG. 20 is a flowchart showing processing for setting variables study_prm_emergency and study_prm_normal to be assigned to the improvement coefficient studyPrm. The characteristic control of the present invention will be described in detail with reference to this figure.
[0140]
First, in step S20001, when the power of the serial printer device to which the present invention is applied is turned on, the process proceeds to step S20002. lf_counter is a counter for storing the number of times the line feed motor has been driven after the apparatus is activated, and is reset to 0 in step S2002 immediately after the power is turned on.
[0141]
In step S20003, lf_counter is compared with STUDY_STARTCASE, which is a reference value for determining how many times the line feed motor is driven after startup to change the value of the improvement coefficient. If, for example, an integer 3 is adopted for STUDY_STARTCASE, the process proceeds to step S20005 until the third drive after power-on, and the process proceeds to step S20004 after that.
[0142]
Step S20005 is a process performed when the number of times of driving after power-on is small and control is assumed to be away from the ideal state, and a larger value is set as the improvement coefficient. In the present embodiment, a numerical value that is four times the basic improvement coefficient STUDY_PRM_BASE is set to study_prm_emergency, and a doubled value is set to study_prm_normal.
[0143]
On the other hand, step S20004 is a process that is performed when the drive is performed a sufficient number of times after the power is turned on, and a smaller value is set as the improvement coefficient. In the present embodiment, a numerical value that is twice the basic improvement coefficient STUDY_PRM_BASE is set to study_prm_emergency, and a numerical value that is 1 time is set to study_prm_normal.
[0144]
In step S20006, driving of the motor is started. The driving here is performed using the improvement coefficient set in step S20004 or step S20005.
[0145]
When the drive ends in step S20007, the value of lf_counter is incremented in step S20008.
[0146]
As described above, in the present embodiment, the parameter v_approach and the elapsed time while waiting for the drive command become equal to or longer than the time during which the environmental temperature, the motor heat storage state, and the like may change. Return s_apr_STOP to the default value.
[0147]
In this way, in situations where there is a high possibility that the state of the device is different from the time when the parameter is set, the parameter can be reset to the default value at an appropriate timing and set again. It can be performed.
[0148]
In the above description, it is determined that there is a high possibility that the information of the device has changed when the standby time during which driving is not performed becomes longer than a preset time. It is also possible to measure information related to the usage status (environment) of the device and return the parameter to the default value when the value exceeds a preset range.
[0149]
<Second Embodiment>
Next, a second embodiment according to the present invention will be described. In the following description, the description of the same parts as those of the first embodiment will be omitted, and the characteristic parts of the second embodiment will be mainly described.
[0150]
This embodiment is a modification of only the processing shown in FIG. 11 in the first embodiment so as to change the parameter setting when using recording media having different conveyance loads. The explanation will focus on the processing of the parts and the actions and effects.
[0151]
FIG. 21 is a schematic diagram illustrating a mechanical configuration of a transport unit in the present embodiment. FIG. 21A illustrates a case where plain paper is transported as a recording medium, and FIG. 21B illustrates a CD-R used as a recording medium. The case where the CD-R tray used in this case is being conveyed is shown.
[0152]
A plain paper 20003 or a CD-R tray 21003 as a recording medium to be conveyed is supported on both sides by a conveying roller 110 and a pinch roller 111. The rotational force of the motor gear 108 is transmitted to the transport roller 110 via the transport roller gear 109. The pinch roller 111 is pressed against the conveying roller 110 by a pinch roller spring 20001 at an appropriate pressure, and prevents the plain paper 20003 or the CD-R tray 21003 from floating from the conveying roller 110. With these configurations, the conveying force from the conveying roller 110 is transmitted to the plain paper 20003 and the CD-R tray 21003 with little energy loss, and these recording media are conveyed by the rotation of the conveying roller 110 and the pinch roller 111. The
[0153]
Since the CD-R tray 21003 is thicker than the plain paper 20003, the interval between the pinch roller 111 and the conveying roller 110 shown in (b) is more separated than that in (a). At this time, the pinch roller spring 20001 is contracted severely.
[0154]
As an ideal transport mechanism, it is desirable that transport loads be equal regardless of the type of recording medium. However, in reality, the conveyance load often changes depending on the type of the recording medium due to, for example, a difference in the pressure of the illustrated pinch roller spring 20001. The present embodiment enables ideal motor control even in such a case.
[0155]
Hereinafter, the drive control process in the present embodiment will be described with reference to the flowchart of FIG. In FIG. 22, the same processes as those in FIG. 11 are denoted by the same reference numerals.
[0156]
When the power is turned on in step S11011, the process proceeds to step S22001, and a variable prtmedia_now indicating the type of the recording medium to be conveyed is initialized with a constant PRTMEDIA_UNKOWN indicating that the medium is not yet determined.
[0157]
In step S22002, it is determined whether or not a drive command has been issued. The process waits until a drive command is received. If a drive command is received, the process advances to step S22003. In step S22003, the type of the recording medium to be conveyed is identified, and if it is plain paper, the process proceeds to step S22004. If it is thick paper, the process proceeds to step S22005. The type of the recording medium can be easily identified by analyzing a command transmitted from the host computer, for example.
[0158]
In step S22004, the variable prtmedia_now in which information indicating the type of the recording medium at the time of the previous driving is stored is referred to and whether or not the value of the variable is the same as that of the plain paper to be conveyed from now on. judge. If the value of the variable is the same as that of plain paper, the process proceeds to step S11001 to start drive control, and if it is not plain paper, the process proceeds to step S22007.
[0159]
In step S22007, a constant PRTMEDIA_NORMAL meaning plain paper is substituted for the variable prtmedia_now. In step S22010, V_APPROACH is set in v_approach, and S_APR_STOP is set in s_apr_STOP to return to the default values. Then, it progresses to step S11001 and drive control is started.
[0160]
In step S22005, the variable prtmedia_now in which information indicating the type of the recording medium at the time of the previous driving is stored is referred to, and it is determined whether or not the value of the variable is the same as that of the thick paper to be conveyed. To do. If the value of the variable is the same as that of the thick paper, the process proceeds to step S11001 to start drive control, and if not, the process proceeds to step S22008.
[0161]
In step S22008, a constant PRTMEDIA_SPECIAL meaning thick paper is substituted for the variable prtmedia_now. In step S22010, V_APPROACH is set in v_approach, and S_APR_STOP is set in s_apr_STOP to return to the default values. Then, it progresses to step S11001 and drive control is started.
[0162]
In step S22006, a variable prtmedia_now in which information indicating the type of the recording medium at the time of the previous driving is stored is referenced, and whether or not the value of the variable is the same as that of the CD-R to be transported from now on. Determine. If the value of the variable is the same as that of the CD-R, the process proceeds to step S11001 to start the drive control, while if it is not the CD-R, the process proceeds to step S22008.
[0163]
In step S22008, a constant PRTMEDIA_CDR meaning CD-R is substituted for the variable prtmedia_now. In step S22010, V_APPROACH is set in v_approach, and S_APR_STOP is set in s_apr_STOP to return to the default values. Then, it progresses to step S11001 and drive control is started.
[0164]
The processing from step S11001 to S11006 is the same as the processing in the first embodiment, and detailed description thereof is omitted. When the drive control end process in step S11006 ends, the process returns to step S22002 to continue the process.
[0165]
As described above, according to the present embodiment, as shown in FIG. 21, the parameters v_approach and s_apr_STOP are the default values each time the type of the recording medium changes, even when the recording medium having a different conveyance load is used. Therefore, the parameter optimized for the different recording medium is not used, while the parameter optimized for the recording medium is used when using the same recording medium. Thus, conveyance control suitable for the recording medium to be used can be performed.
[0166]
<Third Embodiment>
Next, a third embodiment according to the present invention will be described. In the following description, the description of the same parts as those of the first and second embodiments will be omitted, and the characteristic parts of the third embodiment will be mainly described.
[0167]
This embodiment is to prevent the adverse effects that occur when the initial value of the integral compensation amount is set to 0 in the first embodiment, and the processing different from the first embodiment and its operation and effect will be described.
[0168]
FIG. 23 is a diagram showing the relationship between the influence of disturbance and actual control in the motor control in the present embodiment, as in FIG. In the figure, the horizontal axis indicates time, the vertical axis of 2001 indicates speed, and the vertical axis of 2002 indicates position.
[0169]
FIG. 23 shows a case where the speed v_stop immediately before stopping ends at an average and ideal value V_APPROACH.
[0170]
Reference numeral 23001 denotes an ideal position profile, and 2004 denotes an ideal speed profile. The ideal position profile 23001 is composed of four control areas: an acceleration control area 2011, a constant speed control area 2012, a deceleration control area 2013, and a positioning control area 2014.
[0171]
In the ideal speed profile 2004 of 2004, V_START is the initial speed, and V_FLAT indicates the speed of the constant speed control area 2012. V_APPROACH indicates the speed of the positioning control region, and V_PROMISE indicates the fastest value of the speed immediately before stopping that must be absolutely observed in order to achieve the positioning accuracy performance. v_stop is a speed immediately before stopping as an actual value that changes to any value due to a disturbance when actual driving is assumed. In consideration of speed fluctuation in actual driving, V_APPROACH is required to be a speed set sufficiently low so that v_stop does not exceed V_PROMISE regardless of any speed fluctuation.
[0172]
In the present embodiment, position servo is adopted in the acceleration control area 2011, constant speed control area 2012, and deceleration control area 2013, and speed servo is adopted in the positioning control area 2014. The curve of the ideal position profile 23001 shows the profile of the ideal position in the position servo. The curve of the ideal speed profile 2004 indicates the profile of the ideal speed during the speed servo, and indicates the required speed profile required to operate following the ideal position profile 23001 during the position servo.
[0173]
The ideal position profile 23001 is set for each of the areas 2011, 2012, and 2013 where position servo is performed, but is calculated only up to S_APPROACH. This is because an ideal position profile is unnecessary after S_APPROACH because it switches to speed servo after passing S_APPROACH. The deceleration required time T_DEC in the ideal position profile 23001 is constant regardless of actual driving, and a control region corresponding to this is indicated as an ideal deceleration control region 24001.
[0174]
Reference numeral 23003 denotes a real position profile that is affected by a disturbance or the like in each state. Since a delay always occurs in the position servo, the actual position profile 23003 has a delay with respect to the ideal position profile 23001. Therefore, even if the ideal position profile 23001 ends, the actual position generally does not reach S_APPROACH. In the present embodiment, the actual drive reaches S_APPROACH after the ideal position profile 23001 ends. In the meantime, the command position to the position servo is substituted by the virtual ideal position profile 23006. The virtual ideal position profile 23006 is a straight line extended from the end point of the ideal position profile using the final inclination of the ideal position profile 23001.
[0175]
23005 represents the actual speed profile of the physical motor. Feedback control is performed with the ideal position profile 23001 as an input, and while the output speed is slightly delayed with respect to the ideal speed profile 2004, it approaches the ideal speed as the positioning control region 2014 advances, and the final speed immediately before stop is determined as positioning. It is controlled to converge to a speed V_APPROACH at which accuracy performance can be achieved. Note that the transition from the deceleration control region 2013 to the positioning control region 2014 is performed at the moment when S_APPROACH is reached, regardless of the physical drive speed state.
[0176]
S_DEC indicates the position at which the constant speed control area 2012 ends and the deceleration control area 2013 starts, and is a value determined by the ideal position profile 23001. Therefore, S_DEC is not related to the influence of disturbance in actual driving. is there.
[0177]
In the figure, S_APPROACH indicates a position where the deceleration control area 2013 ends and the positioning control area 2014 starts, and S_STOP indicates a stop position. T_ADD is a required time spent in the acceleration control area 2011, and T_DEC is a required time spent in the deceleration control area 2013. T_FLAT is a time spent in the constant speed control region 2012, and is a fixed value determined when the stop position S_STOP when the drive start position is set to 0, that is, the ideal position profile 23001 that satisfies the total drive distance is set.
[0178]
T_APPROACH is the time spent in the positioning control area 2014, and is the time required to move the distance S_APR_STOP from the position S_APPROACH that enters the positioning control area 2014 to the stop position S_STOP when the drive control target actually moves. . FIG. 23 shows a case in which the drive control target moves almost at the ideal speed in the positioning control region 2014. However, in actual control, an ideal physical operation is generally very difficult.
[0179]
In order to perform high-speed and high-accuracy positioning, it is necessary to tune the curve of the ideal position profile 23001 to fit the system. Specifically, the speed of the constant speed control area 2012 is as fast as the system performance allows to shorten the time required for positioning, and the speed of the positioning control area 2014 is the system performance to improve the positioning accuracy. The ideal position profile 23001 is set so that the distance between the acceleration control region 2011, the deceleration control region 2013, and the positioning control region 2014 is as short as the system performance permits in order to shorten the time required for positioning. It is desirable to do.
[0180]
However, since such a detailed method of tuning is not the subject of the present invention, it is assumed here that the ideal position profile 23001 has already been optimally adjusted.
[0181]
t_approach is a variable that represents the time spent in the positioning control region 2014 as an actual value that changes to any value due to a disturbance when an actual drive is assumed.
[0182]
In the present embodiment, as in the above embodiment, constant values are shown in uppercase letters and variable values are shown in lowercase letters. If there are uppercase and lowercase letters for the same spelling value, the value shown in uppercase letters is an ideal constant value, and the value shown in lowercase letters indicates a variable value that can change for the same content value. ing.
[0183]
FIG. 24 simply shows the adverse effects of control that occur when the initial value of the integral compensation amount is 0, using the worst example.
[0184]
The real speed profile 23005 in FIG. 24 requires time t_problem to reach an integral compensation amount that can overcome the static friction force and move. Although it finally starts to move, in order to reduce the deviation of the position that has become excessively large until t_problem, the position servo feedback is greatly applied, and the actual speed profile 23005 greatly exceeds the ideal speed profile 2004. End up.
[0185]
Eventually, the speed decreases as the position deviation decreases, but the speed does not sufficiently decrease even when approaching the stop position because the profile completely deviates from the profile optimally adjusted for the target system. As a result, the time T_DEC is originally required, and the position S_STOP that should be reached at a speed close to V_APPROACH is entered at a speed v_bad that is too fast before the time T_DEC elapses. As a result, overrun occurs and s_stop is overrun, and the required accuracy cannot be satisfied.
[0186]
FIG. 25 is a flowchart for explaining the drive control process in the present embodiment, and FIG. 26 is a timing chart showing the state of signals related to each process of FIG. 25 on the same time axis together with the speed profile.
[0187]
When the power is turned on in step S25011, a variable prtmedia_now for storing information indicating the type of the recording medium to be transported is initialized in step S30000 with a constant PRTMEDIA_UNKOWN that means undecided.
[0188]
Next, in step S25054, a process for detecting the initial value of the integral compensation amount, which is a feature of the present embodiment, is activated.
[0189]
First, in step S25051, a variable init_integral_spd representing the initial value of the integral compensation amount is initialized with zero. In the present embodiment, it is important that this value is initialized to 0 only in step S25051. In step S25051, the LF motor feed table used in the subsequent sequence is selected. In the present embodiment, the table selected here is a low speed drive table, and driving by speed servo at a constant speed v_test is selected.
[0190]
Note that the set value of the speed v_test is directly related to the value of the initial integral compensation amount to be detected, and is preferably determined after tuning suitable for the system. For example, V_APPROACH in FIG. 23 should be used. Can be considered.
[0191]
When the process of step S25051 ends, the driving process using the corresponding table is performed in step S25052. Each process in step S25052 is also described in FIG.
[0192]
Specifically, when the drive control process is started in step S25001, a drive control preparation process is performed in step S25002. Here, the initial value init_integral_spd of the integral compensation amount is substituted into the work area integral_spd that is actually used in feedback control. Step S25002 is a process generally described in the motor control task. In addition to the setting of integral_spd, the selection of a table suitable for the driving purpose, the setting of T_FLAT that matches the driving amount, and the evaluation that is the subject of the present invention The reflection process for reflecting the result of the means in the ideal speed profile used in the next drive and the setting of various work areas are performed, and finally the timer that controls the timer interrupt process is started and terminated.
[0193]
When the timer is started in step S25002, the process proceeds to the actual driving process shown in step S25003. This process is generally described in the timer interrupt process. For example, an interrupt is performed once every 1 msec, an encoder value is read, a current value to be output is calculated by PID calculation, and the like. A value calculated for the motor is output.
[0194]
In parallel with the processing of step S25003, the system monitors whether or not the stop position S_STOP has been reached. When arrival is detected, the arrival detection processing step S25004 to the drive target position is activated and an interrupt is generated. Occurs, and the process proceeds to the drive control end process of step S25005.
[0195]
In step S25005, the output to the motor is quickly disabled, the timer is stopped, and the process ends in step S25006.
[0196]
When the drive control end process in step S 25006 is finished, the process proceeds to step S 25053, where the initial value of the optimum integral compensation amount is analyzed.
[0197]
When the integral compensation amount initial value detecting means in step S25054 is completed as described above, the process proceeds to step S30001, and a drive command standby state is entered. Each time the printer system performs operations such as paper feeding, printing, paper ejection, etc., a paper feed drive command is issued, and upon receipt of this, the process proceeds to step S30002.
[0198]
In step S30002, it is determined whether or not there is already a recording medium on the conveying roller. If there is, the process proceeds to step S30003, and if not, the process proceeds to step S30012 to start drive control.
[0199]
The apparatus of the present embodiment intends to obtain an optimum initial value of integral compensation amount suitable for the type of recording medium, and the integral compensation amount initial value detection process in step S25054 in a state where the recording medium is on the conveyance roller. By executing the above, it is possible to realize more strict conveyance processing suitable for the recording medium. Therefore, if there is no recording medium on the conveyance roller before the paper feeding process is executed, the process after step S30003 has no effect, so that the process is skipped and the process proceeds to step S30012. Branching is performed in the process of S30002.
[0200]
In the case of paper feeding, the recording medium is drawn onto the conveying roller during paper feeding, so that the conveying load changes. However, the accuracy of conveying control required in this case may be lower than the accuracy during recording execution. Therefore, even if the process proceeds to step S30012 suddenly, there is no particular problem as an apparatus.
[0201]
In step S30003, the type of the recording medium to be conveyed is identified, and if it is plain paper, the process proceeds to step S30004, if it is thick paper, the process proceeds to step S30005, and if it is a CD-R tray, the process proceeds to step S30006. The type of the recording medium can be easily identified by analyzing a command transmitted from the host computer, for example.
[0202]
If it is determined that the paper is plain paper, in step S30004, the variable prtmedia_now in which information representing the transport recording medium at the time of the previous driving is stored is referred to, and the value of the variable is the normal to be transported from now on. If it is the same as paper, the process proceeds to step S30012 to start drive control, and if it is not plain paper, the process proceeds to step S30007.
[0203]
In step S30007, a constant PRTMEDIA_NORMAL meaning plain paper is substituted into the variable prtmedia_now, and the process proceeds to step S30010 to perform the same process as the integral compensation amount initial value detection process in step S25054 again.
[0204]
Here, since the process of step S30010 has been performed in a state where the recording medium is held, the recording medium is being transported. Therefore, in order to return only the transported distance, a return process for reversing the transport roller is performed in step S30011. Thereafter, the process proceeds to step S30012 to start drive control.
[0205]
If it is determined that the paper is thick, in step S30005, the variable prtmedia_now in which information representing the recording medium when the previous driving is performed is stored, and the value of the variable is the same as that of the thick paper to be transported. If it is not cardboard, the process proceeds to step S30008.
[0206]
In step S30008, a constant PRTMEDIA_SPECIAL representing thick paper is substituted for the variable prtmedia_now, and the process advances to step S30010 to perform the same process as the integral compensation amount initial value detection process in step S25054 again.
[0207]
If it is determined as the CD-R tray, in step S30006, the variable prtmedia_now in which information representing the recording medium when the last drive is performed is referred to, and the value of the variable is about to be conveyed. If it is the same as CD-R, the process proceeds to step S30012 to start drive control, and if not CD-R, the process proceeds to step S30009.
[0208]
In step S30009, a constant PRTMEDIA_CDR representing CD-R is substituted into the variable prtmedia_now, and the process proceeds to step S30010, and the same process as the integral compensation amount initial value detection process in step S25054 is performed again.
[0209]
In step S30012, a corresponding drive table suitable for the application is selected, drive processing is performed in step S30013, and when the drive processing is completed, the flow returns to step S30001 to enter a standby state for drive commands.
[0210]
FIG. 27 is a flowchart showing the process performed in the actual drive process of step S25003, focusing on the details of the speed PI calculation part, which is a feature of the present invention. Regarding the entire process performed in step S25003, various other processes such as a position P calculation at the time of position servo and a D calculation in a speed servo loop are performed. These processes are features of the present invention. However, since it is a well-known technique, description is abbreviate | omitted.
[0211]
When the actual driving process is activated in step S25003, first, in step S25101, the current speed is obtained by the encoder speed information converting means 6006 and substituted for v (tx). Here, for simplification of explanation, the differential calculation 6007 in FIG. 4 and the differential calculation 7003 in FIG. Note that tx indicates the corresponding time.
[0212]
In step S25102, the difference between the actual value v_ideal (tx) and v (tx) of the ideal speed profile is calculated and substituted into v_difference. v_ideal (tx) is purely the value of the speed ideal profile itself during speed servo, but the result of P operation 6002 is used during position servo described with reference to FIG.
[0213]
In the present embodiment, it is assumed that v_test is applied to v_ideal (tx) when executing the process of step S25054. In this case, v_ideal (tx) is a constant value that does not depend on a change in time.
[0214]
In step S25103, an integral compensation amount integral_spd at tx is calculated using a constant value INTERGRAL_PARAM set in advance as an integral gain. This is generally called an integral operation.
[0215]
In step S25104, a final output current value output_pwm is calculated using a constant value PROPORTION_PARAM preset as a proportional gain. This is generally called a proportional operation.
[0216]
In step S25105, the calculation result is output to the driving target, and in step S25106, the integral compensation amount integral_spd at the time tx is stored in the array mem_integral_spd [tx]. The array mem_integral_spd [tx] is an area for storing information used in step S25053.
[0217]
In step S25107, the counter tx indicating the time is incremented, and the process ends in step S28008.
[0218]
FIG. 28 is a timing chart showing the driving state together with the speed profile when the integral compensation amount initial value detection processing in step S25054 is activated.
[0219]
The speed command value is fixed at v_test, while the integral compensation amount integral_spd starts from 0, so the actual speed profile 2005 rises with a slight delay from time 0. Thereafter, the velocity at a certain time swings up and down with respect to v_test, but eventually converges to v_test.
[0220]
In this embodiment, T_SAMPLING_START is defined as the time at which the upper and lower amplitudes of the actual speed profile with respect to v_test are expected to converge to an acceptable level under the above conditions, and the integral compensation amount after this time is determined in step S25053. Used in the optimal integral compensation amount initial value analysis process. T_SAMPLING_END is a time indicating the end of data used in the optimum integral compensation amount initial value analysis processing in step S25053.
[0221]
As will be described later, in the optimum integral compensation amount initial value analysis processing in step S25053, since the integral compensation amount recorded in the time from T_SAMPLING_START to T_SAMPLING_END is averaged, even if the speed slightly increases or decreases in this section, this implementation is performed. It does not interfere with the effect of the form. The effect of this embodiment can be sufficiently expected if the time region required for rising from the speed 0 to the arrival of v_test can be cut by T_SAMPLING_START.
[0222]
FIG. 29 is a flowchart showing details of the optimum integral compensation amount initial value analysis processing in step S25053.
[0223]
First, in step S25201, a counter tx used for data access is initialized, and a work area sum_integral_spd for calculating the total value is initialized.
[0224]
Through steps S25202, S25203, and S25204, the total amount of integral compensation recorded in the time from T_SAMPLING_START to T_SAMPLING_END is acquired. In step S25205, the average value of the integral compensation amounts is calculated and substituted into init_integral_spd, and the process ends.
[0225]
By the processing described above, the initial value of the integral compensation amount becomes the initial value of the integral compensation amount during constant speed driving when driving at a constant speed by v_test. The integral compensation amount that can be driven at a constant speed by v_test means that the value corresponds to the output current value that can overcome the static friction and move.
[0226]
Therefore, when the drive control according to the present embodiment is compared with the drive shown in FIG. 24, the output current value is already a value sufficient to overcome the static friction and start moving at time 0, so that the stationary time t_problem can be shortened. It is possible to expect faster and more accurate control. Further, by setting v_test to V_APPROACH, the risk that the initial value of the integral compensation amount detected in this state induces a speed overshoot with respect to V_FLAT becomes very low.
[0227]
Furthermore, by detecting the integral compensation amount individually for each recording medium by the processing shown in steps S30003 to S30010, it is possible to avoid an adverse effect due to a difference in characteristics of the recording medium to be used, and to realize optimal drive control. Can do.
[0228]
[Other Embodiments]
The first to third embodiments described above may be implemented alone or in combination of two or more.
[0229]
In the above embodiment, the present invention is applied to control of a recording paper conveyance (line feed; LF) motor of a serial ink jet printer. However, the present invention is not limited to an ink jet printer, and uses various motors. Applicable to various devices.
[0230]
In addition, all of the above embodiments apply the present invention to the control of a DC motor, but the present invention can be applied to any motor other than the DC motor that can perform feedback control such as the above-described additional value control. .
[0231]
An object of the present invention is to supply a storage medium storing software program codes for realizing the functions of the above-described embodiments to a system or apparatus, and store the computer (or CPU or MPU) of the system or apparatus in the storage medium. Needless to say, this can also be achieved by reading and executing the programmed program code.
[0232]
In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention.
[0233]
As a storage medium for supplying the program code, for example, a floppy disk, a hard disk, an optical disk, a magneto-optical disk, a CD-ROM, a CD-R, a magnetic tape, a nonvolatile memory card, a ROM, or the like can be used.
[0234]
Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an OS (operating system) operating on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.
[0235]
Further, after the program code read from the storage medium is written into a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer, the function expansion is performed based on the instruction of the program code. It goes without saying that the CPU or the like provided in the board or the function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments are realized by the processing.
[0236]
When the present invention is applied to the above-described storage medium, the storage medium stores program codes corresponding to the flowcharts described above (shown in FIGS. 11, 13 to 15, 20, 22, 25, 27, and 29). Will be.
[0237]
【The invention's effect】
As described above, according to the present invention, for example, the timing when the mechanism is not driven for a predetermined time or more, the timing when the information about the device is determined not to be within the predetermined range, the time of the previous driving and the conveyance by the mechanism The parameter value is returned to the default value at a timing such as when it is determined that the type of load to be changed has changed, and when a drive condition or target is different, problems caused by the parameter value being taken over are prevented. be able to.
[0238]
Therefore, even after the activation, the parameter setting is changed at a predetermined timing, and high-speed and high-accuracy position control can be performed even when the recording medium or environment used is changed.
[Brief description of the drawings]
FIG. 1 is a graph schematically showing speed fluctuation when a DC motor is driven at a constant speed.
FIG. 2 is a diagram for explaining the influence of torque fluctuation due to cogging, using ideal position profile additional value control and ideal speed profile additional value control used in a DC motor as examples.
FIG. 3 is an overall view of a serial inkjet printer according to an embodiment of the present invention.
4 is a block diagram illustrating a control configuration of the printer of FIG. 3; FIG.
FIG. 5 is a block diagram illustrating a detailed configuration of the printer controller shown in FIG. 4;
FIG. 6 is a block diagram showing a control procedure by a position servo of a general DC motor.
FIG. 7 is a block diagram showing a control procedure by a speed servo of a general DC motor.
FIG. 8 is a diagram for explaining in detail the influence and control of torque fluctuation due to cogging.
FIG. 9 is a diagram for explaining in detail the influence and control of torque fluctuation due to cogging.
FIG. 10 is a diagram for explaining in detail the influence and control of torque fluctuation due to cogging.
FIG. 11 is a flowchart illustrating a drive control process in the first embodiment.
12 is a timing chart showing the state of signals related to each process of FIG. 11 on the same time axis together with a speed profile.
13 is a flowchart showing an operation performed in the drive control preparation process of FIG.
14 is a flowchart showing an operation performed in the actual driving process of FIG.
15 is a flowchart showing an operation performed in the drive control end process of FIG.
FIG. 16 is a graph in which a curve of an actual speed profile in which torque fluctuation due to cogging is clearly shown is added to FIG. 9;
FIG. 17 is a graph showing a drive state after the process of step S15007 of FIG. 15 is performed.
FIG. 18 is a graph in which a curve of an actual speed profile in which torque fluctuation due to cogging is clearly shown is added to FIG.
FIG. 19 is a graph showing a drive state after the process of step S15007 of FIG. 15 is performed.
FIG. 20 is a flowchart showing a process for setting a variable to be substituted for an improvement coefficient.
FIG. 21 is a diagram schematically illustrating a mechanical configuration of a transport unit.
FIG. 22 is a flowchart illustrating a drive control process in the second embodiment.
FIG. 23 is a diagram showing the relationship between the influence of disturbance and actual control in the motor control in the second embodiment, as in FIG.
FIG. 24 is a diagram schematically showing the adverse effects of control that occur when the initial value of the integral compensation amount is 0, using the worst example.
FIG. 25 is a flowchart illustrating a drive control process in the third embodiment.
FIG. 26 is a timing chart showing the state of signals related to each process of FIG. 25 on the same time axis together with the speed profile.
FIG. 27 is a flowchart showing processing performed in actual driving processing, paying attention to details of a PI calculation portion of speed.
FIG. 28 is a timing chart showing a driving state together with a speed profile when an integral compensation amount initial value detection process is activated;
FIG. 29 is a flowchart showing details of an optimal integral compensation amount initial value analysis process.
[Explanation of symbols]
101 Recording head having ink tank
102 Carriage on which the recording head 101 is mounted
103 Guide shaft
104 belt
105 Drive motor
106 Paper feed base
107 Paper transport motor
108 Motor gear
109 Conveyor roller gear
110 Conveying roller
111 Pinch roller
114 chassis
115 Recording paper
116 Rotary encoder film
117 Encoder sensor
231 Host interface
401 CPU for printer control of printer apparatus
402 ROM
403 RAM
404 Printer head
405 Motor driver to drive the motor
406 Printer Controller
407 Temperature sensor composed of thermistor, etc.
501 I / O register
502 Receive buffer controller
503 Recording buffer controller
504 Memory controller
505 Print sequence controller
1001 Velocity fluctuation when driving at V_x
1002 Speed fluctuation when driven at 2 * V_x
1003 Speed fluctuation when driven at 8 * V_x
1004 Point corresponding to the phase angle at which the motor itself rotates at high speed
1005 Point corresponding to the phase angle at which the motor itself rotates at a low speed
2003 Ideal position profile
2004 Ideal speed profile
2011 Acceleration control area
2012 Constant speed control area
2013 Deceleration control area
2014 Positioning control area
2003 Ideal position profile
2004 Ideal speed profile
2005 Actual drive speed profile of physical motor
2006 Actual Real Speed Profile
2007 Actual speed profile
6001 Ideal position profile
6005 Encoder sensor
6009 Encoder position information conversion means
6006 Encoder speed information conversion means
6002 Position servo major loop
6003 PI calculation
6007 Differential operation
6004 Energy given to DC motor
6008 disturbance
7001 Ideal speed profile
7002 PI operation
7003 Differential operation
8001 Ideal position profile
8003 Real position profile
8005 Real driving speed profile of physical motor
8006 Virtual ideal position profile
9001 Virtual deceleration control area
9003 Real position profile
9005 Real driving speed profile of physical motor
10003 Real Location Profile
10005 Real driving speed profile of physical motor
20001 Pinch roller spring
20003 Plain paper
21003 CD-R tray

Claims (8)

モータを動力源として搬送対象物を搬送する搬送ローラを回転させる機器におけるモータの制御方法であって、
前記モータを駆動する際に、目標位置及び予め設定された所定の速度指令値に従って時間と位置との関係を示す位置プロファイルと、時間と速度との関係を示す速度プロファイルとを作成するプロファイル作成工程と、
前記位置プロファイル及び前記速度プロファイルに従って前記モータの駆動を加速領域、前記駆動対象物が前記加速領域の後に減速を始めた領域を含む減速領域、及び前記減速領域に続き静止に至るまでの位置決め領域に分けて制御する駆動工程と、
前記駆動工程を開始する指示を受ける毎に、前記駆動工程による先の搬送時と搬送対象物の種類が変わったか否かを外部から入力されるコマンドに基づいて判定する判定工程と、
前記判定工程にて前記搬送対象物の種類が変わったと判定した場合、前記所定の速度指令値に従って速度サーボにより前記搬送ローラを回転させて前記搬送対象物を搬送するよう前記モータを駆動する予備駆動と、前記予備駆動における前記搬送ローラの回転を監視して前記加速領域の開始時に前記モータへ出力する電流値に対応する積分補償量の算出と、前記搬送対象物を前記予備駆動が開始される前の位置に戻すように前記搬送ローラを回転させるよう前記モータを駆動する戻し駆動とを実行させた後に、前記積分補償量を反映して前記駆動工程を実行する一方、前記判定工程にて前記搬送対象物の種類が変わらないと判定した場合、前記予備駆動と前記積分補償量の算出と前記戻し駆動とを実行せずに、前記駆動工程を実行する制御工程と、
を備えることを特徴としたモータの制御方法。
A method for controlling a motor in a device that rotates a conveyance roller that conveys a conveyance object using a motor as a power source,
A profile creation step of creating a position profile indicating a relationship between time and position and a speed profile indicating a relationship between time and speed according to a target position and a predetermined speed command value set in advance when driving the motor When,
In accordance with the position profile and the velocity profile, the motor is driven into an acceleration region, a deceleration region including a region where the driven object starts decelerating after the acceleration region, and a positioning region until the stationary state continues after the deceleration region. A driving process to control separately ;
A determination step of determining whether or not the type of the object to be transported has changed from the time of the previous transport by the drive step, based on a command input from the outside each time an instruction to start the drive step is received,
When it is determined in the determination step that the type of the conveyance object has changed, a preliminary drive that drives the motor to convey the conveyance object by rotating the conveyance roller by a speed servo according to the predetermined speed command value Monitoring the rotation of the transport roller in the preliminary drive, calculating the integral compensation amount corresponding to the current value output to the motor at the start of the acceleration region, and starting the preliminary drive of the transport object After performing the return drive that drives the motor to rotate the transport roller so as to return to the previous position, the drive step is performed reflecting the integral compensation amount, while the determination step includes When it is determined that the type of the object to be conveyed does not change, the control process that executes the driving process without executing the preliminary driving, the calculation of the integral compensation amount, and the return driving is performed. And,
A method for controlling a motor, comprising:
前記搬送対象物は、記録媒体またはCD-Rトレイであることを特徴とする請求項に記載のモータの制御方法。The motor control method according to claim 1 , wherein the conveyance object is a recording medium or a CD-R tray. 前記モータがDCモータであることを特徴とする請求項1または2に記載のモータの制御方法。The motor control method according to claim 1 or 2, wherein the motor is a DC motor. モータを動力源として搬送ローラを回転させて搬送対象物を搬送するモータの制御装置であって
前記モータを駆動する際に、目標位置及び予め設定された所定の速度指令値に従って、時間と位置との関係を示す位置プロファイルと、時間と速度との関係を示す速度プロファイルを作成するプロファイル作成手段と、
前記位置プロファイル及び前記速度プロファイルに従って前記モータの駆動を加速領域、前記加速領域の後に減速を始めた領域を含む減速領域、及び前記減速領域に続き静止に至るまでの位置決め領域に分けて制御する駆動手段と、
前記駆動手段による駆動の指示を受ける毎に、前記駆動手段による先の搬送時と前記搬送対象物の種類が変わったか否かを外部から入力されるコマンドに基づいて判定する判定手段と、
前記判定手段にて前記搬送対象物の種類が変わったと判定した場合、前記所定の速度指令値に従って速度サーボにより前記搬送ローラを回転させて前記搬送対象物を搬送するよう前記モータを駆動する予備駆動と、前記予備駆動における前記搬送ローラの回転を監視して前記加速領域の開始時に前記モータへ出力する電流値に対応する積分補償量の算出と、前記搬送対象物を前記予備駆動が開始される前の位置に戻すように前記搬送ローラを回転させるよう前記モータを駆動する戻し駆動とを実行させた後に、前記積分補償量を反映して前記駆動手段による実行を行わせる一方、前記判定手段にて前記搬送対象物の種類が変わらないと判定した場合、前記予備駆動と前記積分補償量の算出と前記戻し駆動とを実行せずに、前記駆動手段による駆動を実行する制御手段と、を備えることを特徴としたモータの制御装置。
A motor control device for conveying a conveyance object by rotating a conveyance roller using a motor as a power source.
Profile driving means for generating a position profile indicating a relationship between time and position and a speed profile indicating a relationship between time and speed according to a target position and a predetermined speed command value set in advance when driving the motor When,
Drive that controls driving of the motor in accordance with the position profile and the speed profile , divided into an acceleration region, a deceleration region including a region where deceleration is started after the acceleration region, and a positioning region until the stationary state following the deceleration region. Means,
A determination unit that determines, based on a command input from the outside, whether or not the type of the object to be transported has been changed from the time of the previous transport by the drive unit each time an instruction to drive by the drive unit is received;
When the determination means determines that the type of the transport object has changed, a preliminary drive that drives the motor to transport the transport object by rotating the transport roller by a speed servo according to the predetermined speed command value Monitoring the rotation of the transport roller in the preliminary drive, calculating the integral compensation amount corresponding to the current value output to the motor at the start of the acceleration region, and starting the preliminary drive of the transport object After performing the return drive that drives the motor to rotate the transport roller so as to return to the previous position, the execution means is made to reflect the integral compensation amount, while the determination means If it is determined that the type of the object to be transported does not change, the drive means does not execute the preliminary drive, the calculation of the integral compensation amount, and the return drive. And a control means for executing the dynamic control device of the motor characterized in that it comprises.
前記搬送対象物は、記録媒体またはThe transport object is a recording medium or CD-RCD-R トレイであることを特徴とする請求項4に記載のモータの制御装置。The motor control device according to claim 4, wherein the motor control device is a tray. 前記モータがDCモータであることを特徴とする請求項4または5に記載のモータの制御装置。The motor control device according to claim 4 , wherein the motor is a DC motor. 請求項4から6のいずれか1項に記載のモータの制御装置を備えたことを特徴とする電子機器。An electronic apparatus comprising the motor control device according to claim 4 . 請求項4から6のいずれか1項に記載のモータの制御装置を記録媒体の搬送に使用することを特徴とする記録装置。7. A recording apparatus using the motor control device according to claim 4 for transporting a recording medium.
JP2002247480A 2002-08-27 2002-08-27 MOTOR CONTROL METHOD, MOTOR CONTROL DEVICE, ELECTRONIC DEVICE, AND RECORDING DEVICE Expired - Fee Related JP4012013B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002247480A JP4012013B2 (en) 2002-08-27 2002-08-27 MOTOR CONTROL METHOD, MOTOR CONTROL DEVICE, ELECTRONIC DEVICE, AND RECORDING DEVICE

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002247480A JP4012013B2 (en) 2002-08-27 2002-08-27 MOTOR CONTROL METHOD, MOTOR CONTROL DEVICE, ELECTRONIC DEVICE, AND RECORDING DEVICE

Publications (3)

Publication Number Publication Date
JP2004088926A JP2004088926A (en) 2004-03-18
JP2004088926A5 JP2004088926A5 (en) 2005-10-27
JP4012013B2 true JP4012013B2 (en) 2007-11-21

Family

ID=32055114

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002247480A Expired - Fee Related JP4012013B2 (en) 2002-08-27 2002-08-27 MOTOR CONTROL METHOD, MOTOR CONTROL DEVICE, ELECTRONIC DEVICE, AND RECORDING DEVICE

Country Status (1)

Country Link
JP (1) JP4012013B2 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4697731B2 (en) * 2005-06-03 2011-06-08 株式会社リコー PRINT MEDIUM CONTROL DEVICE, IMAGE FORMING DEVICE, PROGRAM, AND RECORDING MEDIUM
JP4558079B2 (en) * 2009-03-18 2010-10-06 キヤノン株式会社 Equipment with motor
JP4647036B2 (en) * 2010-07-20 2011-03-09 キヤノン株式会社 Equipment with motor
JP5874264B2 (en) * 2011-09-16 2016-03-02 ブラザー工業株式会社 Motor control apparatus and image forming apparatus
JP6021310B2 (en) * 2011-10-12 2016-11-09 キヤノン株式会社 Recording material conveying apparatus and image forming apparatus
JP6064576B2 (en) 2012-03-12 2017-01-25 株式会社リコー Motor control device and motor control method
CN104460703B (en) * 2014-12-04 2017-07-21 浙江全世科技有限公司 Can self-tuning all solid state microwave source MPT, self-tuning device and control method

Also Published As

Publication number Publication date
JP2004088926A (en) 2004-03-18

Similar Documents

Publication Publication Date Title
JP3658339B2 (en) Method and apparatus for motor control
JP3658340B2 (en) Method and apparatus for motor control
JP4497891B2 (en) Recording device and transport control device
US8934187B2 (en) Magnetic tape device and method for controlling movement of magnetic head
KR100403099B1 (en) Control method for sheet member conveying apparatus and control method for recording apparatus
US6729712B2 (en) Printing apparatus and printing control method
JP4012013B2 (en) MOTOR CONTROL METHOD, MOTOR CONTROL DEVICE, ELECTRONIC DEVICE, AND RECORDING DEVICE
JP4729002B2 (en) Servo control device, method and program, and ink jet recording apparatus
JP3814509B2 (en) Method and apparatus for motor control
JP4012012B2 (en) MOTOR CONTROL METHOD, MOTOR CONTROL DEVICE, ELECTRONIC DEVICE, AND RECORDING DEVICE
JPH01102770A (en) Motor driving controller for magnetic recording and reproducing device
JP5635900B2 (en) Control device
JP2006036490A (en) Conveying device, recording device and conveying control method for recording device
US20020063544A1 (en) Method and apparatus for moving a medium through a medium indexing device
JP2004166458A (en) Motor controlling method
JP2007045576A (en) Driving motor control method and printer
US20020101216A1 (en) DC motor control method and apparatus
JP2006082410A (en) Inkjet recording device
JP2002345280A (en) Method and apparatus for controlling motor
JP2002233179A (en) Dc-motor control method and dc-motor control device
JP5295210B2 (en) Conveying device and recording apparatus provided with the device
JPS6347180A (en) Controlling method for spacing mechanism
JP2002233177A (en) Dc motor control method and dc motor control device
JP2006334961A (en) Printing medium controller, image formation device, program and recording medium
JP2003131891A (en) Multiple task control method, computer program, recording medium, multiple task control system, device and printer

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050823

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050823

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070405

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070511

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070710

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070827

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070906

R150 Certificate of patent or registration of utility model

Ref document number: 4012013

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100914

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100914

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110914

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110914

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120914

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120914

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130914

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees