JP2016018274A - Method for calculating control input to control device, and control device - Google Patents

Method for calculating control input to control device, and control device Download PDF

Info

Publication number
JP2016018274A
JP2016018274A JP2014139078A JP2014139078A JP2016018274A JP 2016018274 A JP2016018274 A JP 2016018274A JP 2014139078 A JP2014139078 A JP 2014139078A JP 2014139078 A JP2014139078 A JP 2014139078A JP 2016018274 A JP2016018274 A JP 2016018274A
Authority
JP
Japan
Prior art keywords
manipulated variable
digits
deviation
unit
coefficient
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.)
Pending
Application number
JP2014139078A
Other languages
Japanese (ja)
Inventor
小田垣 秀雄
Hideo Odagaki
秀雄 小田垣
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.)
Sumitomo Wiring Systems Ltd
AutoNetworks Technologies Ltd
Sumitomo Electric Industries Ltd
Original Assignee
Sumitomo Wiring Systems Ltd
AutoNetworks Technologies Ltd
Sumitomo Electric Industries Ltd
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 Sumitomo Wiring Systems Ltd, AutoNetworks Technologies Ltd, Sumitomo Electric Industries Ltd filed Critical Sumitomo Wiring Systems Ltd
Priority to JP2014139078A priority Critical patent/JP2016018274A/en
Publication of JP2016018274A publication Critical patent/JP2016018274A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a method for calculating control input to a control device and the control device with which it is possible to prevent a reduction in the accuracy of calculating control input in spite of a calculation in which the number of bits is relatively small.SOLUTION: For example, a preliminary measure is adopted so that control input U(n-1) is divided into U(n-1) and U(n-1) as it is stored. Each time a calculation based on difference equation is made, the current deviation E(n) is stored in a RAM 23 as a 16-bit fixed-point number. Then, each of U(n-1) and A, U(n-2) and A, E(n) and B, E(n-1) and B, E(n-2) and B, U(n-1) and A, and U(n-2) and Ais read out from the RAM and multiplied on by a multiplication unit 31, and the control input U(n) indicated by the calculation result integrated in Acc 34 is divided, as it is stored, into U(n-1) and U(n-1), as substantially a 31(=16+15) bit fixed-point number, for calculation in the next cycle.SELECTED DRAWING: Figure 3

Description

本発明は、パルス伝達関数に対応する差分方程式に基づいて制御対象に入力する操作量を時系列的に演算する制御装置の操作量の演算方法、及び該演算方法を実行する制御装置に関する。   The present invention relates to a method for calculating an operation amount of a control device that calculates, in a time series, an operation amount input to a control target based on a differential equation corresponding to a pulse transfer function, and a control device that executes the operation method.

DC/DCコンバータの出力電圧を安定化するための制御方式として、出力電圧を帰還する電圧モード制御方式が広く用いられている。電圧モード制御方式は、制御が比較的簡単であるが位相補償回路が複雑になるという側面がある。   As a control method for stabilizing the output voltage of the DC / DC converter, a voltage mode control method that feeds back the output voltage is widely used. The voltage mode control method is relatively easy to control but has a complicated phase compensation circuit.

一方、出力電圧に加えて出力電流を帰還する電流モード制御方式は、制御自体が比較的複雑になるが位相補償回路が簡単になる上、ラインレギュレーション性に優れており、フィードバックループの安定性が高く、並列に構成して大容量化するのに適している等、多くの利点があるとされている(例えば特許文献1参照)。   On the other hand, the current mode control method that feeds back the output current in addition to the output voltage makes the control itself relatively complicated, but the phase compensation circuit is simple and the line regulation is excellent, and the feedback loop is stable. It is said that there are many advantages, such as being high in parallel and suitable for increasing the capacity (see, for example, Patent Document 1).

さて、電源装置における制御回路の機能をデジタル化して構成の簡略化を図る方法が提案されている。例えば特許文献2には、フィードバックされた電圧のA/D変換値に基づいてCPUが一定時間毎に制御指令値を算出し、この制御指令値に基づいてスイッチング素子に与えるPWM信号のデューティを決定する電圧モード制御方式の電源装置が記載されている。   There has been proposed a method for simplifying the configuration by digitizing the function of the control circuit in the power supply apparatus. For example, in Patent Document 2, the CPU calculates a control command value at regular intervals based on the A / D conversion value of the fed back voltage, and determines the duty of the PWM signal to be given to the switching element based on the control command value. A voltage mode control type power supply apparatus is described.

特開2007−209135号公報JP 2007-209135 A 特開2013−70509号公報JP 2013-70509 A

しかしながら、例えば電流モード制御方式のような複雑な制御方式を採用する場合、高精度の演算が必要となることが多く、一度に扱えるビット数が多い演算器、マイコン又はDSPを用いた場合は、コスト増の要因となる。   However, for example, when a complicated control method such as a current mode control method is adopted, high-precision calculation is often required, and when using an arithmetic unit, microcomputer, or DSP with a large number of bits that can be handled at one time, It becomes a factor of cost increase.

本発明は斯かる事情に鑑みてなされたものであり、その目的とするところは、ビット数が比較的少ない演算を行うにもかかわらず操作量の演算精度の低下を防止することが可能な制御装置の操作量の演算方法及び制御装置を提供することにある。   The present invention has been made in view of such circumstances, and an object of the present invention is to provide a control capable of preventing a decrease in the calculation accuracy of the manipulated variable in spite of performing a calculation with a relatively small number of bits. An object of the present invention is to provide a method for calculating an operation amount of a device and a control device.

本発明に係る制御装置の操作量の演算方法は、伝達特性がパルス伝達関数で表される制御対象に入力する操作量を、目標値に対する制御量の偏差に基づいて制御する制御装置で、前記パルス伝達関数に対応する差分方程式に基づいて前記操作量を反復的に演算する方法において、記憶部と、N桁(Nは2以上の整数)の固定小数点の乗数及び被乗数を乗算する乗算部とを用意し、前記記憶部は、前記偏差及び操作量夫々の係数をN桁の固定小数点数として予め記憶すると共に、前記差分方程式に基づく演算の都度、前記偏差及び操作量夫々をN桁及びN+M桁(MはNより小さい自然数)の固定小数点数として記憶し、前記乗算部は、前記差分方程式に基づく演算の都度、前記偏差及び該偏差の係数、前記操作量の上位N桁及び該操作量の係数、並びに前記操作量の下位M桁及び該操作量の係数の夫々を前記記憶部から読み出して乗算することを特徴とする。   The operation amount calculation method of the control device according to the present invention is a control device that controls an operation amount input to a control target whose transfer characteristic is represented by a pulse transfer function based on a deviation of the control amount from a target value. In the method of iteratively calculating the manipulated variable based on a differential equation corresponding to a pulse transfer function, a storage unit, and a multiplication unit that multiplies an N-digit (N is an integer of 2 or more) fixed-point multiplier and multiplicand. And the storage unit stores in advance the coefficients of the deviation and the manipulated variable as N-digit fixed-point numbers, and each time the calculation based on the difference equation, the deviation and the manipulated variable are stored in N digits and N + M, respectively. Stored as a fixed-point number with digits (M is a natural number smaller than N), and the multiplication unit calculates the deviation and the coefficient of the deviation, the upper N digits of the manipulated variable, and the manipulated variable each time an operation is performed based on the difference equation. Person in charge And characterized by multiplying the respective coefficients of lower M digits and the operation amount of the operation amount is read from the storage unit.

本発明に係る制御装置の操作量の演算方法は、前記乗算部の乗算結果を積算する積算部を用意し、前記差分方程式は、下記の式(1)であり、前記積算部の積算結果における最下位からのM桁及び該M桁に続くN桁の夫々を、前記式(1)の演算結果におけるUL (n)及びUH (n)とすることを特徴とする。
H (n)+UL (n)・2-M =b0 ・E(n)+b1 ・E(n−1)+・・+bm ・E(n−m)+a1 ・UH (n−1)+a2 ・UH (n−2)+・・+ak ・UH (n−k)+{a1 ・UL (n−1)+a2 ・UL (n−2)+・・+ak ・UL (n−k)}2-M ・・・(1)
但し、
n :2以上の整数
m、k:1≦m≦k≦n−1を満たす整数
E(n):目標値に対するn回目の制御量の偏差
H (n):n回目の操作量U(n)の上位N桁
L (n):n回目の操作量U(n)の下位M桁
bm :偏差の係数
k :操作量の係数
The operation amount calculation method of the control device according to the present invention provides an integration unit that integrates the multiplication results of the multiplication unit, and the difference equation is the following equation (1), in the integration result of the integration unit: The M digit from the least significant digit and the N digit following the M digit are defined as U L (n) and U H (n) in the calculation result of the formula (1).
U H (n) + UL (n) · 2 −M = b 0 · E (n) + b 1 · E (n-1) + ·· + bm · E (n−m) + a 1 · U H (n− 1) + a 2 · U H (n−2) + ·· + a k • U H (n−k) + {a 1 • U L (n−1) + a 2 • U L (n−2) +・ ・ + A kUL (n−k)} 2 −M (1)
However,
n: integer m greater than or equal to 2, k: integer satisfying 1 ≦ m ≦ k ≦ n−1 E (n): deviation of control amount for the nth time U H (n): nth manipulated variable U ( n) upper N digits U L (n): lower M digits of the nth manipulated variable U (n) bm: coefficient of deviation a k : coefficient of manipulated variable

本発明に係る制御装置は、伝達特性がパルス伝達関数で表される制御対象に入力する操作量を、目標値に対する制御量の偏差に基づいて制御し、前記パルス伝達関数に対応する差分方程式によって前記操作量を反復的に演算する制御装置において、前記偏差及び操作量夫々の係数をN桁(Nは2以上の整数)の固定小数点数として記憶すると共に、前記差分方程式に基づく演算の都度、前記偏差及び操作量夫々をN桁及びN+M桁(MはNより小さい自然数)の固定小数点数として記憶する記憶部と、前記差分方程式に基づく演算の都度、前記偏差及び該偏差の係数、前記操作量の上位N桁及び該操作量の係数、並びに前記操作量の下位M桁及び該操作量の係数の夫々を前記記憶部から読み出して乗算する乗算部とを備えることを特徴とする。   The control device according to the present invention controls an operation amount input to a control target whose transfer characteristic is represented by a pulse transfer function based on a deviation of the control amount with respect to a target value, and uses a difference equation corresponding to the pulse transfer function. In the control device that repeatedly calculates the manipulated variable, the coefficient of each of the deviation and manipulated variable is stored as a fixed-point number of N digits (N is an integer of 2 or more), and each calculation based on the difference equation, A storage unit that stores the deviation and the operation amount as N-digit and N + M-digit (M is a natural number smaller than N) fixed-point numbers, and for each calculation based on the difference equation, the deviation and the coefficient of the deviation, the operation And a multiplication unit that reads out and multiplies the upper N digits of the quantity and the coefficient of the manipulated variable, and the lower M digits of the manipulated variable and the coefficient of the manipulated variable from the storage unit.

本発明に係る制御装置は、前記制御対象は、演算された操作量に基づいてPWM信号を生成するPWM生成部と、該PWM生成部が生成したPWM信号によってスイッチングするスイッチング素子を有する電圧変換部とを含むことを特徴とする。   In the control device according to the present invention, the control target includes a PWM generation unit that generates a PWM signal based on the calculated operation amount, and a voltage conversion unit that has a switching element that is switched by the PWM signal generated by the PWM generation unit. It is characterized by including.

本発明に係る制御装置は、前記制御量は、前記電圧変換部が出力する電流であることを特徴とする。   The control device according to the present invention is characterized in that the control amount is a current output from the voltage converter.

本発明にあっては、パルス伝達関数に対応する差分方程式に基づく演算の前に、偏差及び操作量夫々の係数をN桁の固定小数点数として予め記憶部に記憶し、偏差及び操作量夫々をN桁及びN+M桁(MはNより小さい自然数)の固定小数点数として記憶するための領域を確保しておく。差分方程式に基づく演算の都度、先ず現在の偏差をN桁の固定小数点数として記憶部に記憶する。そして、偏差及びその係数と、操作量の上位N桁及び操作量の係数と、操作量の下位M桁及び操作量の係数とを夫々記憶部から読み出して乗算部で乗算し、差分方程式の演算結果が示す操作量をN+M桁の固定小数点数として記憶部に記憶する。
これにより、N桁以下の乗数及び被乗数を乗算する乗算部を用いるにもかかわらず、演算結果が示す操作量が高精度で次の演算に引き継がれる。
In the present invention, before the calculation based on the difference equation corresponding to the pulse transfer function, the coefficients of the deviation and the manipulated variable are stored in advance in the storage unit as N-digit fixed-point numbers, and the deviation and the manipulated variable are respectively stored. An area to be stored as a fixed-point number of N digits and N + M digits (M is a natural number smaller than N) is secured. For each calculation based on the difference equation, the current deviation is first stored in the storage unit as an N-digit fixed-point number. Then, the deviation and its coefficient, the upper N digits of the manipulated variable and the manipulated variable coefficient, and the lower M digit of the manipulated variable and the manipulated variable coefficient are read from the storage unit and multiplied by the multiplier, and the difference equation is calculated. The operation amount indicated by the result is stored in the storage unit as a fixed-point number of N + M digits.
As a result, the operation amount indicated by the calculation result is succeeded to the next calculation with high accuracy despite the use of a multiplication unit that multiplies the multiplier and multiplicand of N digits or less.

本発明にあっては、式(1)に含まれる複数の乗算項の乗算結果を積算し、積算結果における最下位からのN+M桁のうち、上位N桁及び下位M桁夫々を、式(1)の演算結果におけるUH (n−1)及びUL (n−1)とする。
これにより、式(1)のn+1回目の演算に先立って、U(n)が桁落ちなしにUH (n−1)及びUL (n−1)に代入される。
In the present invention, the multiplication results of the plurality of multiplication terms included in the equation (1) are integrated, and the upper N digits and the lower M digits of the N + M digits from the lowest in the integration result are expressed by the equation (1). ) To U H (n−1) and U L (n−1) in the calculation result.
As a result, prior to the (n + 1) th calculation of Equation (1), U (n) is substituted into U H (n−1) and U L (n−1) without any loss of digits.

本発明にあっては、演算された操作量に基づいてPWM生成部がPWM信号を生成し、生成されたPWM信号によって電圧変換部のスイッチング素子がスイッチングする。
これにより、演算精度の低下を防止する演算方法によって演算された操作量に基づいて、電圧変換部のスイッチング素子がオン/オフに制御される。
In the present invention, the PWM generator generates a PWM signal based on the calculated operation amount, and the switching element of the voltage converter is switched by the generated PWM signal.
Accordingly, the switching element of the voltage conversion unit is controlled to be turned on / off based on the operation amount calculated by the calculation method that prevents the calculation accuracy from being lowered.

本発明にあっては、電圧変換部が出力する電流が制御量であり、いわゆる電流モード制御方式によって、電圧変換部が出力する電流が高精度に制御される。   In the present invention, the current output from the voltage converter is the controlled variable, and the current output from the voltage converter is controlled with high accuracy by a so-called current mode control method.

本発明によれば、N桁以下の乗数及び被乗数を乗算する乗算部を用いるにもかかわらず、演算結果が示す操作量が高精度で次の演算に引き継がれる。
従って、ビット数が比較的少ない演算を行うにもかかわらず操作量の演算精度の低下を防止することが可能となる。
According to the present invention, despite the use of a multiplication unit that multiplies a multiplier and a multiplicand of N digits or less, the operation amount indicated by the operation result is succeeded to the next operation with high accuracy.
Accordingly, it is possible to prevent a reduction in the calculation accuracy of the manipulated variable even though an operation with a relatively small number of bits is performed.

本発明の実施の形態1に係る制御装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the control apparatus which concerns on Embodiment 1 of this invention. 制御装置における制御部の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the control part in a control apparatus. 本発明の実施の形態1に係る制御装置における演算器の構成例を示すブロック図である。It is a block diagram which shows the structural example of the calculator in the control apparatus which concerns on Embodiment 1 of this invention. 本発明の実施の形態1に係る制御装置でPWM回路に対する操作量を演算するCPUの処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of CPU which calculates the operation amount with respect to a PWM circuit with the control apparatus which concerns on Embodiment 1 of this invention. 本発明の実施の形態2に係る制御装置における演算器の構成例を示すブロック図である。It is a block diagram which shows the structural example of the calculator in the control apparatus which concerns on Embodiment 2 of this invention. 本発明の実施の形態2に係る制御装置でPWM回路に対する操作量を演算するCPUの処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of CPU which calculates the operation amount with respect to a PWM circuit with the control apparatus which concerns on Embodiment 2 of this invention.

以下、本発明をその実施の形態を示す図面に基づいて詳述する。
(実施の形態1)
図1は、本発明の実施の形態1に係る制御装置の構成例を示すブロック図であり、図2は、制御装置における制御部2の機能構成を示すブロック図である。図1に示す制御装置は、例えば外部のバッテリ4の電圧を降圧して負荷5に供給するDC/DCコンバータ(電圧変換部に相当:以下、単にコンバータという)1と、該コンバータ1にPWM信号を与える制御部2とを備える。コンバータ1は、バッテリ4の電圧を昇圧又は昇降圧するものであってもよい。
Hereinafter, the present invention will be described in detail with reference to the drawings illustrating embodiments thereof.
(Embodiment 1)
FIG. 1 is a block diagram illustrating a configuration example of a control device according to Embodiment 1 of the present invention, and FIG. 2 is a block diagram illustrating a functional configuration of a control unit 2 in the control device. The control device shown in FIG. 1 includes, for example, a DC / DC converter (corresponding to a voltage conversion unit: hereinafter simply referred to as a converter) 1 that steps down the voltage of an external battery 4 and supplies the voltage to a load 5, And a control unit 2 for providing Converter 1 may boost or step up or down the voltage of battery 4.

コンバータ1は、一端がバッテリ4に接続されたスイッチング素子11と、該スイッチング素子11の他端に夫々の一端が接続された第2のスイッチング素子12及びインダクタ13と、該インダクタ13の他端に一端が接続された抵抗器14と、該抵抗器14の他端及び接地電位の間に接続されたコンデンサ15とを備える。第2のスイッチング素子12の他端は、接地電位に接続されている。負荷5はコンデンサ15の両端に接続される。スイッチング素子11及び第2のスイッチング素子12は、例えば夫々の一端をドレインとするNチャネル型のMOSFETである。   The converter 1 includes a switching element 11 having one end connected to the battery 4, a second switching element 12 and an inductor 13 each having one end connected to the other end of the switching element 11, and the other end of the inductor 13. A resistor 14 having one end connected thereto and a capacitor 15 connected between the other end of the resistor 14 and a ground potential are provided. The other end of the second switching element 12 is connected to the ground potential. The load 5 is connected across the capacitor 15. The switching element 11 and the second switching element 12 are, for example, N-channel MOSFETs each having one end as a drain.

コンバータ1は、また、スイッチング素子11及び第2のスイッチング素子12をオン/オフに駆動する駆動信号を与える駆動回路16を備える。駆動回路16は、制御部2から与えられたPWM信号及び該PWM制御信号と相補的なPWM信号の夫々をスイッチング素子11及び第2のスイッチング素子12のゲートに与える。   The converter 1 also includes a drive circuit 16 that provides a drive signal for driving the switching element 11 and the second switching element 12 on / off. The drive circuit 16 supplies the PWM signal supplied from the control unit 2 and a PWM signal complementary to the PWM control signal to the gates of the switching element 11 and the second switching element 12.

制御部2は、CPU21を有し、CPU21は、プログラム等の情報を記憶するROM22、一時的に発生した情報を記憶するRAM(記憶部に相当)23及びPWM制御の周期等の各種時間を計時するタイマ24と互いにバス接続されている。   The control unit 2 includes a CPU 21. The CPU 21 measures various times such as a ROM 22 that stores information such as a program, a RAM (corresponding to a storage unit) 23 that stores temporarily generated information, and a PWM control cycle. Are connected to each other by a bus.

CPU21には、また、駆動回路16に与えるPWM信号を生成するPWM回路(PWM生成部に相当)25、抵抗器14の両端の電圧を検出して抵抗器14に流れる電流をデジタルの電流値に変換するA/D変換回路26、及びコンデンサ15の両端の電圧をデジタルの電圧値に変換するA/D変換回路27がバス接続されている。PWM回路25及びコンバータ1が、制御対象に相当する。   The CPU 21 also detects a voltage at both ends of the resistor 14 by generating a PWM circuit (corresponding to a PWM generator) 25 that generates a PWM signal to be supplied to the drive circuit 16, and converts the current flowing through the resistor 14 to a digital current value. An A / D conversion circuit 26 for conversion and an A / D conversion circuit 27 for converting the voltage at both ends of the capacitor 15 into a digital voltage value are bus-connected. The PWM circuit 25 and the converter 1 correspond to control targets.

図2に移って、制御部2は、負荷5に供給する電圧を所謂電流モード制御方式によって制御するための電圧ループ制御器28及び電流ループ制御器29夫々の機能を実現する。制御部2では、電圧ループ制御器28による電圧ループ制御と、電流ループ制御器29による電流ループ制御とが同時並行的に実行される。図中「○」の記号は減算器を表す。   2, the control unit 2 realizes the functions of the voltage loop controller 28 and the current loop controller 29 for controlling the voltage supplied to the load 5 by a so-called current mode control method. In the control unit 2, the voltage loop control by the voltage loop controller 28 and the current loop control by the current loop controller 29 are executed in parallel. The symbol “◯” in the figure represents a subtractor.

電圧ループ制御器28は、負荷5に供給された出力電圧をA/D変換回路27で変換したデジタルの電圧値Voを、目標の電圧値Vrefから減算した偏差に基づいて、後段の電流ループ制御器29に対する目標の電流値Irefとなる操作量を演算する。この電圧ループ制御では、コンバータ1が出力する電圧が制御量である。   The voltage loop controller 28 controls the subsequent current loop based on the deviation obtained by subtracting the digital voltage value Vo obtained by converting the output voltage supplied to the load 5 by the A / D conversion circuit 27 from the target voltage value Vref. An operation amount that is a target current value Iref for the calculator 29 is calculated. In this voltage loop control, the voltage output from the converter 1 is the control amount.

電流ループ制御器29は、抵抗器14に流れる電流をA/D変換回路26で変換したデジタルの電流値Ilを、電圧ループ制御器28からの目標の電流値Irefから減算した偏差に基づいて、PWM回路25に対する操作量を演算する。PWM回路25は、与えられた操作量に応じたデューティのPWM信号を生成する。この電流ループ制御では、コンバータ1が出力する電流が制御量である。   The current loop controller 29 is based on a deviation obtained by subtracting the digital current value Il obtained by converting the current flowing through the resistor 14 by the A / D conversion circuit 26 from the target current value Iref from the voltage loop controller 28. An operation amount for the PWM circuit 25 is calculated. The PWM circuit 25 generates a PWM signal having a duty corresponding to a given operation amount. In this current loop control, the current output from the converter 1 is the control amount.

電圧ループ制御としてPID制御を行う場合、操作量としての電流値Iは、例えば以下の式(2)により演算される。式(2)の値は、一定桁の固定小数点数同士の積和を求める公知の方法を用いて反復的に演算することが可能であるため、演算方法の説明を省略する。   When performing PID control as voltage loop control, the current value I as the operation amount is calculated by, for example, the following equation (2). Since the value of equation (2) can be repeatedly calculated using a known method for obtaining the product sum of fixed-point numbers having a fixed number of digits, description of the calculation method is omitted.

I(n)=I(n-1)+Kp ・{e(n)−e(n-1)}+Ki ・{e(n)+e(n−1)}+Kd ・[{e(n)−e(n-1)}−{e(n-1)−e(n-2)}]・・・(2)
但し、
n :2以上の整数
I(n):n回目の操作量
e(n):n回目の目標値に対するn回目の制御量の偏差
p :比例項の係数
i :積分項の係数
d :微分項の係数
I (n) = I (n -1) + K p · {e (n) -e (n-1)} + K i · {e (n) + e (n-1)} + K d · [{e (n ) -E (n-1)}-{e (n-1) -e (n-2)}] (2)
However,
n: integer of 2 or more I (n): n-th manipulated variable e (n): deviation of the n-th controlled variable from the n-th target value K p : proportional term coefficient K i : integral term coefficient K d : Coefficient of differential term

次に、電流ループ制御について説明する。離散時間制御システムにおける制御対象のパルス伝達関数Gc(z)は、z変換によって一般的に以下の式(3)で表すことができる。   Next, current loop control will be described. The pulse transfer function Gc (z) to be controlled in the discrete time control system can be generally expressed by the following equation (3) by z conversion.

Gc(z)=(b0 +b1 ・z-1 +b2 ・z-2 +・・+bm ・z-m )/(1−a1 ・z-1 −a2 ・z-2 −・・−ak ・z-k )・・・(3)
但し、m≦k
Gc (z) = (b 0 + b 1 · z −1 + b 2 · z −2 + ·· + b m · z −m ) / (1−a 1 · z −1 −a 2 · z −2 − ·· − a k · z −k ) (3)
However, m ≦ k

式(3)に対応する差分方程式は、以下の式(4)によって表される。式(4)によって演算されるU(n)をPWM回路25に対する操作量とする場合、E(n)は、式(2)で演算されたI(n)に対する、A/D変換回路26で変換されたデジタルの電流値の偏差である。   The difference equation corresponding to Equation (3) is expressed by Equation (4) below. When U (n) calculated by the equation (4) is an operation amount for the PWM circuit 25, E (n) is an A / D conversion circuit 26 for I (n) calculated by the equation (2). It is the deviation of the converted digital current value.

U(n)=b0 ・E(n)+b1 ・E(n−1)+・・+bm ・E(n−m)+a1 ・U(n−1)+a2 ・U(n−2)+・・+ak ・U(n−k)・・・(4)
但し、
n :2以上の整数
m、k:1≦m≦k≦n−1を満たす整数
E(n):目標値に対するn回目の制御量の偏差
U(n):n回目の操作量
bm :偏差の係数
k :操作量の係数
U (n) = b 0 · E (n) + b 1 · E (n-1) + ·· + bm · E (n-m) + a 1 · U (n-1) + a 2 · U (n-2 ) + ・ ・ + Ak・ U (nk) (4)
However,
n: integer m greater than or equal to 2, k: integer satisfying 1 ≦ m ≦ k ≦ n−1 E (n): deviation of the nth controlled variable from the target value U (n): nth manipulated variable bm: deviation Coefficient a k : coefficient of manipulated variable

式(4)の右辺をN桁(Nは2以上の整数)の固定小数点数同士の積和として演算する場合、演算結果の桁数が2N以上となるため、右辺の演算結果を左辺のU(n)に代入するときに、演算結果の下位N桁が失われて演算精度が低下する。そこで、U(n)、U(n−1)、・・・U(n−k)をN+M桁(MはNより小さい自然数)の固定小数点数として、式(4)を上述の式(1)に置き換える。以下に式(1)を再掲する。   When the right side of Expression (4) is calculated as a product sum of N-digit (N is an integer of 2 or more) fixed-point numbers, the number of digits of the operation result is 2N or more. When substituting for (n), the lower N digits of the operation result are lost and the operation accuracy is reduced. Therefore, U (n), U (n−1),... U (n−k) is a fixed-point number of N + M digits (M is a natural number smaller than N), and equation (4) is expressed by the above equation (1). ). Equation (1) is shown again below.

H (n)+UL (n)・2-M =b0 ・E(n)+b1 ・E(n−1)+・・+bm ・E(n−m)+a1 ・UH (n−1)+a2 ・UH (n−2)+・・+ak ・UH (n−k)+{a1 ・UL (n−1)+a2 ・UL (n−2)+・・+ak ・UL (n−k)}2-M ・・・(1)
但し、
H (n):n回目の操作量U(n)の上位N桁
L (n):n回目の操作量U(n)の下位M桁
U H (n) + UL (n) · 2 −M = b 0 · E (n) + b 1 · E (n-1) + ·· + bm · E (n−m) + a 1 · U H (n− 1) + a 2 · U H (n−2) + ·· + a k • U H (n−k) + {a 1 • U L (n−1) + a 2 • U L (n−2) +・ ・ + A kUL (n−k)} 2 −M (1)
However,
U H (n): Upper N digits of the nth manipulated variable U (n) UL (n): Lower M digits of the nth manipulated variable U (n)

ここで特に、偏差の係数と操作量の係数とで数値に大きな差がある場合、数値が小さい方の係数と操作量又は偏差との乗算結果が、左辺の操作量に十分反映されないこととなり、制御が正確に行えなくなる。例えば、係数bm の各数値が係数ak の各数値よりもJ桁(ここでは、JはNより小さい自然数とする)程度小さい場合、式(1)を以下の式(5)に置き換える。つまり、予め係数bm に2J を乗じて係数bm 及び偏差の積和に桁落ちが生じないようにする。 Here, in particular, when there is a large difference in numerical value between the coefficient of deviation and the coefficient of manipulated variable, the multiplication result of the coefficient with the smaller numerical value and the manipulated variable or deviation will not be sufficiently reflected in the manipulated variable on the left side, Control cannot be performed accurately. For example, when each numerical value of the coefficient bm is smaller than each numerical value of the coefficient ak by J digits (where J is a natural number smaller than N), the expression (1) is replaced with the following expression (5). In other words, the coefficient bm is preliminarily multiplied by 2 J so that the product sum of the coefficient bm and the deviation is not lost.

H (n)+UL (n)・2-M ={(b0 ・2J )・E(n)+(b1 ・2J )・E(n−1)+・・+(bm ・2J )・E(n−m)}2-J +a1 ・UH (n−1)+a2 ・UH (n−2)+・・+ak ・UH (n−k)+{a1 ・UL (n−1)+a2 ・UL (n−2)+・・+ak ・UL (n−k)}2-M ・・・(5) U H (n) + U L (n) · 2 −M = {(b 0 · 2 J ) · E (n) + (b 1 · 2 J ) · E (n−1) + ·· + (bm • 2 J) · E (n- m)} 2 -J + a 1 · U H (n-1) + a 2 · U H (n-2) + ·· + a k · U H (n-k) + { a 1 · U L (n- 1) + a 2 · U L (n-2) + ·· + a k · U L (n-k)} 2 -M ··· (5)

このように桁数を増加させた操作量の上位N桁及び下位M桁を分割して演算し、且つ、bm の数値精度を変換することにより、各係数と操作量又は偏差との乗算を行う乗算部で乗数及び被乗数の桁数をN桁から増やすことなく、高精度の演算を行えるようにする。
なお、以下では、N桁の固定小数点数をN桁の2進数で表す例について説明するが、2進数に限定されず、例えばN桁の10進数について演算を行う場合に適用してもよい。本実施の形態1では、N=16であり、M=15である(詳細については後述する)。
In this way, the upper N digits and the lower M digits of the manipulated variable with the increased number of digits are divided and operated, and the numerical precision of bm is converted to multiply each coefficient by the manipulated variable or deviation. High-precision arithmetic can be performed without increasing the number of digits of the multiplier and multiplicand from N digits in the multiplier.
In the following, an example in which an N-digit fixed-point number is represented by an N-digit binary number will be described. However, the present invention is not limited to a binary number, and may be applied to, for example, an arithmetic operation on an N-digit decimal number. In the first embodiment, N = 16 and M = 15 (details will be described later).

実際に式(5)に基づく演算を行う場合、演算結果の数値が小さくなる積和から先に演算して桁落ちを極力避けることが好ましい。ここでは、式(5)を例えば以下の式(6)のように変形して演算すればよい。   When the calculation based on the formula (5) is actually performed, it is preferable to calculate first from the product sum in which the numerical value of the calculation result is small, and to avoid the carry loss as much as possible. Here, equation (5) may be transformed into, for example, the following equation (6) for calculation.

H (n)+UL (n)・2-M =[{a1 ・UL (n−1)+a2 ・UL (n−2)+・・+ak ・UL (n−k)}2J-M +(b0 ・2J )・E(n)+(b1 ・2J )・E(n−1)+・・+(bm ・2J )・E(n−m)]2-J +a1 ・UH (n−1)+a2 ・UH (n−2)+・・+ak ・UH (n−k)・・・(6) U H (n) + UL (n) · 2 −M = [{a 1 · UL (n−1) + a 2 · UL (n−2) + ·· + ak · UL (n−k )} 2 JM + (b 0 · 2 J ) · E (n) + (b 1 · 2 J ) · E (n−1) + ·· + (b m · 2 J ) · E (n−m)] 2 −J + a 1 · U H (n−1) + a 2 · U H (n−2) + ·· + ak · U H (n−k) (6)

次に、電流ループ制御について、具体的な数値を用いて説明する。電流ループ制御では、インダクタ13に流れる電流をフィードバックしてスイッチング素子11をオン/オフに制御しており、PWM回路25が生成するPWM信号の変化に対してインダクタ13に流れる電流の変化が急峻である。このような特性に対応するため、式(1)及び式(4)〜(6)における偏差の係数bm は、1より十分小さくすることが好ましい。   Next, current loop control will be described using specific numerical values. In the current loop control, the switching element 11 is controlled to be turned on / off by feeding back the current flowing through the inductor 13, and the change in the current flowing through the inductor 13 is steep with respect to the change in the PWM signal generated by the PWM circuit 25. is there. In order to cope with such characteristics, it is preferable that the deviation coefficient bm in the equations (1) and (4) to (6) is sufficiently smaller than 1.

さて、式(3)で表されるパルス伝達関数Gc(z)におけるポール及びゼロ点が夫々2つ存在する場合、Gc(z)は、以下の式(7)のように表される。   When there are two poles and two zero points in the pulse transfer function Gc (z) represented by Expression (3), Gc (z) is represented by Expression (7) below.

Gc(z)=(b0 +b1 ・z-1 +b2 ・z-2 )/(1−a1 ・z-1 −a2 ・z-2 )・・・(7) Gc (z) = (b 0 + b 1 · z −1 + b 2 · z −2 ) / (1−a 1 · z −1 −a 2 · z −2 ) (7)

式(7)に対応する差分方程式は、式(6)から抽出して以下の式(8)のとおりとなる。   The difference equation corresponding to the equation (7) is extracted from the equation (6) and becomes the following equation (8).

H (n)+UL (n)・2-M =[{a1 ・UL (n−1)+a2 ・UL (n−2)}2J-M +(b0 ・2J )・E(n)+(b1 ・2J )・E(n−1)+(b2 ・2J )・E(n−2)]2-J +a1 ・UH (n−1)+a2 ・UH (n−2)・・・(8) U H (n) + UL (n) · 2 −M = [{a 1 · UL (n−1) + a 2 · UL (n−2)} 2 JM + (b 0 · 2 J ) · E (n) + (b 1 · 2 J ) · E (n−1) + (b 2 · 2 J ) · E (n−2)] 2 −J + a 1 · U H (n−1) + a 2・ U H (n-2) (8)

式(8)における各係数の数値の具体例を10進数で示すと、以下の式(9)及び(10)のとおりである。   When a specific example of the numerical value of each coefficient in the equation (8) is represented by a decimal number, the following equations (9) and (10) are obtained.

1 =1.997、a2 =−0.997・・・(9)
0 =0.0004076、b1 =0.0001103、b2 =−0.0002973・・・(10)
a 1 = 1.997, a 2 = −0.997 (9)
b 0 = 0.0004076, b 1 = 0.0001103, b 2 = −0.0002973 (10)

つまり、係数ak の絶対値の最大値は、係数bm の絶対値の最大値に対して5千倍程度大きい。これは2進数で言うと12〜13桁程度大きいことになる。以下では、例えばJ=12とする。
次に、式(8)に基づく演算を行う制御部2によって実現される演算器について、その動作を示すフローチャートを用いて説明する。
In other words, the maximum absolute value of the coefficient ak is about 5,000 times larger than the maximum absolute value of the coefficient bm. This is about 12 to 13 digits larger in binary. In the following, for example, J = 12.
Next, an arithmetic unit realized by the control unit 2 that performs the calculation based on Expression (8) will be described with reference to a flowchart showing the operation.

図3は、本発明の実施の形態1に係る制御装置における演算器の構成例を示すブロック図であり、図4は、本発明の実施の形態1に係る制御装置でPWM回路25に対する操作量を演算するCPU21の処理手順を示すフローチャートである。図4の処理は、式(8)に基づく演算を行う周期、即ちPWM制御の制御周期毎に起動され、ROM22に予め格納された制御プログラムに従って、CPU21により実行される。   FIG. 3 is a block diagram illustrating a configuration example of the arithmetic unit in the control device according to the first embodiment of the present invention. FIG. 4 illustrates an operation amount for the PWM circuit 25 in the control device according to the first embodiment of the present invention. It is a flowchart which shows the process sequence of CPU21 which calculates. The process of FIG. 4 is started at every cycle of performing the calculation based on Expression (8), that is, every control cycle of PWM control, and is executed by the CPU 21 according to a control program stored in the ROM 22 in advance.

図3における31及び32は乗算部であり、乗算部31は、RAM23に夫々記憶された16ビット長の乗数及び被乗数を乗算する。乗算部31の乗算結果は、加算部33によって32ビット長のAcc34の内容に累積的に加算される。乗算部32は、32ビット長のAcc34の内容を、RAM23に記憶された内容に対応する桁数だけ算術シフトするものである。従って、加算部33及びAcc34が積算部に相当する。Acc34の最上位ビットは符号ビットである。   In FIG. 3, reference numerals 31 and 32 denote multiplication units, and the multiplication unit 31 multiplies the 16-bit multiplier and multiplicand stored in the RAM 23, respectively. The multiplication result of the multiplication unit 31 is cumulatively added to the contents of the 32-bit Acc 34 by the addition unit 33. The multiplying unit 32 arithmetically shifts the contents of the 32-bit Acc 34 by the number of digits corresponding to the contents stored in the RAM 23. Therefore, the adding unit 33 and Acc 34 correspond to an integrating unit. The most significant bit of Acc34 is a sign bit.

反復的な演算を開始する前に、CPU21は、式(8)における定数であるa1 及びa2 を所定ビット数(以下、Dという)だけ左に算術シフトして被演算数としての精度が最も高くなるようにする。具体的には、被演算数を整数として見た場合、−32768〜32767の範囲内にてできるだけ絶対値が大きくなるようにする。ここではD=14であるから、a1 及びa2 を14ビットだけ算術左シフトするが、演算中の桁溢れを防ぐために、算術左シフトする桁数を13ビット又はそれ以下にしてもよい。 Before starting the iterative calculation, the CPU 21 arithmetically shifts the constants a 1 and a 2 in the equation (8) to the left by a predetermined number of bits (hereinafter referred to as D), and the accuracy as the operand is increased. Try to be the highest. Specifically, when the number of operands is viewed as an integer, the absolute value is made as large as possible within the range of −32768 to 32767. Here, since D = 14, a 1 and a 2 are arithmetically shifted to the left by 14 bits. However, in order to prevent overflow during operation, the number of digits to be shifted to the arithmetic left may be 13 bits or less.

図3に示すA1 及びA2 は、以上のとおり予め以下の式(11)によって算出された数値であり、RAM23に記憶される。これにより、A1 及びA2 夫々をビット0(LSB)からビット15(MSB)までの16ビットの符号付き固定小数点数として見た場合、ビット13及び14の間に小数点があるものとして扱われる。ここではD=14であるから、A1 及びA2 は、符号ビットを除いて整数部が1ビットであり、小数部が14ビットである。 A 1 and A 2 shown in FIG. 3 are numerical values calculated in advance by the following equation (11) as described above, and are stored in the RAM 23. Thus, when each of A 1 and A 2 is viewed as a 16-bit signed fixed-point number from bit 0 (LSB) to bit 15 (MSB), it is treated as having a decimal point between bits 13 and 14. . Since D = 14 here, A 1 and A 2 have an integer part of 1 bit and a decimal part of 14 bits excluding the sign bit.

1 =a1 ・2D 、A2 =a2 ・2D 、・・・(11) A 1 = a 1 · 2 D , A 2 = a 2 · 2 D , (11)

一方、b0 、b1 及びb2 は、a1 及びa2 よりも更にJビットだけ算術左シフトすべき係数であるから、図3に示すB0 、B1 及びB2 が、予め以下の式(12)によって算出されてRAM23に記憶される。D=14、且つJ=12の場合、B0 、B1 及びB2 は、仮想的にビット25及び26の間に小数点があるものとして扱われる。 On the other hand, b 0 , b 1, and b 2 are coefficients that should be shifted to the arithmetic left by J bits further than a 1 and a 2 , so that B 0 , B 1, and B 2 shown in FIG. It is calculated by Expression (12) and stored in the RAM 23. When D = 14 and J = 12, B 0 , B 1 and B 2 are treated as having a decimal point between the bits 25 and 26 virtually.

0 =b0 ・2D+J 、B1 =b1 ・2D+J 、B2 =b2 ・2D+J ・・・(12) B 0 = b 0 · 2 D + J , B 1 = b 1 · 2 D + J , B 2 = b 2 · 2 D + J (12)

また、図3に示すAEL 及びAHL 夫々は、式(8)における他の定数が予め以下の式(13)によって算出されたものであり、RAM23に記憶される。 Further, each of A EL and A HL shown in FIG. 3 is obtained by previously calculating the other constants in the equation (8) according to the following equation (13), and is stored in the RAM 23.

EL =2J-M 、AHL =2-J ・・・(13) A EL = 2 JM , A HL = 2 -J (13)

その他、図3に示すUL (n−1)、UL (n−2)、E(n−1)、E(n−2)、UH (n−1)及びUH (n−2)については、初期値としての0がRAM23に記憶される。Acc34の初期値は0である。 In addition, UL (n-1), UL (n-2), E (n-1), E (n-2), UH (n-1) and UH (n-2) shown in FIG. ) Is stored in the RAM 23 as an initial value. The initial value of Acc34 is 0.

次に図4に移って、図3に示す演算器によって式(8)を反復的に演算する処理について詳述する。以下では、「格納」を「記憶」と同じ意味で用いる。また、Acc34に対する記憶又は格納を除いて、全ての記憶又は格納は、RAM23に対して行われる。予めRAM23に格納されたA1 ,A2 ,B0 ,B1 ,B2 ,AEL ,AHL の内容は、適時RAM23から読み出される。 Next, moving on to FIG. 4, the process of repeatedly calculating the equation (8) by the calculator shown in FIG. 3 will be described in detail. In the following, “store” is used in the same meaning as “memory”. All storage or storage is performed on the RAM 23 except for storage or storage on the Acc 34. The contents of A 1 , A 2 , B 0 , B 1 , B 2 , A EL , A HL stored in advance in the RAM 23 are read from the RAM 23 in a timely manner.

図4の処理が起動された場合、CPU21は、式(2)で演算されたI(n)を目標値として、目標値に対するA/D変換回路26で変換されたデジタルの電流値の偏差を算出し(S11)、算出した偏差をE(n)に格納する(S12)。本実施の形態1では、一例として、E(n)を正規化して、絶対値が1より小さい適当な大きさの値となるようにする。つまり、E(n)は、ビット15が符号ビットであり、ビット14及び15の間に小数点があるものとして扱われる。但し、E(n)の正規化は必須ではない。   When the process of FIG. 4 is started, the CPU 21 sets the deviation of the digital current value converted by the A / D conversion circuit 26 from the target value, with I (n) calculated by the equation (2) as the target value. Calculate (S11), and store the calculated deviation in E (n) (S12). In the first embodiment, as an example, E (n) is normalized so that the absolute value becomes a value of an appropriate size smaller than 1. That is, E (n) is treated as if bit 15 is a sign bit and there is a decimal point between bits 14 and 15. However, normalization of E (n) is not essential.

次いで、CPU21は、A1 とUL (n−1)の内容を乗算部31で乗算し、乗算結果を加算部33によってAcc34に加算する(S13)。同様に、CPU21は、A2 とUL (n−2)の内容を乗算部31で乗算し、乗算結果を加算部33によってAcc34に加算する(S14)。 Next, the CPU 21 multiplies the contents of A 1 and U L (n−1) by the multiplication unit 31 and adds the multiplication result to Acc 34 by the addition unit 33 (S13). Similarly, the CPU 21 multiplies the contents of A 2 and U L (n−2) by the multiplication unit 31, and adds the multiplication result to Acc 34 by the addition unit 33 (S14).

次いで、CPU21は、Acc34の内容をAEL の内容に応じて算術シフトする(S15)。具体的には、AEL に2J-M が格納されているから、CPU21は、Acc34の内容をJ−Mビットだけ算術左シフト(換言すればM−Jビットだけ算術右シフト)する。 Then, CPU 21 is an arithmetic shift in accordance with the contents of Acc34 the contents of the A EL (S15). Specifically, since 2 JM is stored in A EL , the CPU 21 arithmetically shifts the contents of Acc 34 by JM bits (in other words, arithmetic right shift by MJ bits).

次いで、CPU21は、B0 とE(n)の内容を乗算部31で乗算し、乗算結果を加算部33によってAcc34に加算する(S16)。同様に、CPU21は、B1 とE(n−1)の内容を乗算部31で乗算し、乗算結果を加算部33によってAcc34に加算する(S17)と共に、B2 とE(n−2)の内容を乗算部31で乗算し、乗算結果を加算部33によってAcc34に加算する(S18)。 Next, the CPU 21 multiplies the contents of B 0 and E (n) by the multiplication unit 31, and adds the multiplication result to Acc 34 by the addition unit 33 (S16). Similarly, the CPU 21 multiplies the contents of B 1 and E (n−1) by the multiplier 31 and adds the multiplication result to Acc 34 by the adder 33 (S17), and B 2 and E (n−2). Is multiplied by the multiplication unit 31, and the multiplication result is added to Acc34 by the addition unit 33 (S18).

ここで、B0 、B1 及びB2 は小数部が仮想的に26ビットであり、E(n)、E(n−1)及びE(n−2)は小数部が15ビットであるため、これらの積和が積算されて格納されるAcc34は、小数部が仮想的に41ビットとなる。つまりAcc34を符号付き固定小数点数として見た場合、仮想的にビット40及び41の間に小数点がある。 Here, B 0 , B 1 and B 2 are virtually 26 bits in the decimal part, and E (n), E (n−1) and E (n−2) are 15 bits in the decimal part. , Acc 34 in which these product sums are accumulated and stored has a virtual decimal part of 41 bits. That is, when Acc34 is viewed as a signed fixed-point number, there is a decimal point between bits 40 and 41 virtually.

次いで、CPU21は、Acc34の内容をAHL の内容に応じて算術シフトする(S19)。具体的には、AHL に2-J が格納されているから、CPU21は、Acc34の内容をJビットだけ算術右シフトする。この算術右シフトを実行した後では、Acc34の小数点の位置は、ビット28及び29の間にある。 Then, CPU 21 is an arithmetic shift in accordance with the contents of Acc34 the contents of the A HL (S19). Specifically, since 2 −J is stored in A HL , the CPU 21 arithmetically shifts the contents of Acc 34 by J bits. After performing this arithmetic right shift, the decimal point position of Acc34 is between bits 28 and 29.

次いで、CPU21は、A1 とUH (n−1)の内容を乗算部31で乗算し、乗算結果を加算部33によってAcc34に加算する(S20)。同様に、CPU21は、A2 とUH (n−2)の内容を乗算部31で乗算し、乗算結果を加算部33によってAcc34に加算する(S21)。この時点でAcc34には、既に式(8)の演算結果としてのU(n)が格納されている。 Next, the CPU 21 multiplies the contents of A 1 and U H (n−1) by the multiplication unit 31 and adds the multiplication result to Acc 34 by the addition unit 33 (S20). Similarly, the CPU 21 multiplies the contents of A 2 and U H (n−2) by the multiplication unit 31, and adds the multiplication result to Acc 34 by the addition unit 33 (S21). At this time, U (n) is already stored in Acc34 as the calculation result of Expression (8).

その後、CPU21は、次の周期における演算のために、UH (n−1)及びUL (n−1)夫々の内容をRAM23から読み出してUH (n−2)及びUL (n−2)に格納する(S22)。 Thereafter, the CPU 21 reads out the contents of U H (n−1) and U L (n−1) from the RAM 23 for the calculation in the next cycle, and reads U H (n−2) and U L (n− 2) (S22).

さて、本実施の形態1では、U(n)が、PWM回路25に対する操作量であり、絶対値が1より小さいデューティを表す値として演算される。つまり、U(n)は、ビット15が符号ビットであり、ビット14及び15の間に小数点がある。一方、ステップS21の演算結果としてのAcc34は、ビット28及び29の間に小数点があるから、符号ビット(ビット30)を含めて、Acc34のビット30からビット0までの31ビットをU(n)として抽出すればよい。   In the first embodiment, U (n) is an operation amount for the PWM circuit 25 and is calculated as a value representing a duty whose absolute value is smaller than 1. That is, in U (n), bit 15 is a sign bit and there is a decimal point between bits 14 and 15. On the other hand, since Acc 34 as the calculation result of step S21 has a decimal point between bits 28 and 29, 31 bits from bit 30 to bit 0 of Acc 34, including the sign bit (bit 30), are U (n). It may be extracted as

そこで、CPU21は、次の周期における演算のために、Acc34のビット30〜15及びビット14〜0夫々の内容をUH (n−1)及びUL (n−1)に格納する(S23)。この場合、Acc34のビット14〜0の内容は、UL (n−1)に右詰で格納される。 Therefore, the CPU 21 stores the contents of bits 30 to 15 and bits 14 to 0 of Acc 34 in U H (n−1) and U L (n−1) for calculation in the next cycle (S23). . In this case, the contents of bits 14-0 of Acc34 are stored right-justified in U L (n-1).

その後、CPU21は、E(n−1)の内容をE(n−2)に格納し(S24)、更にE(n)の内容をE(n−1)に格納して(S25)図4の処理を終了する。以上のステップS11からS25までの処理を反復的に繰り返すことにより、コンバータ1の出力電圧が電流モード制御方式で制御される。   Thereafter, the CPU 21 stores the contents of E (n-1) in E (n-2) (S24), and further stores the contents of E (n) in E (n-1) (S25). Terminate the process. The output voltage of the converter 1 is controlled by the current mode control method by repeatedly repeating the above steps S11 to S25.

以上のように本実施の形態1によれば、式(7)で示されるパルス伝達関数に対応する式(8)の差分方程式に基づいて演算を開始する前に、偏差及び操作量夫々の係数b0 ,b1 ,b2 及びa1 ,a2 を16ビットの固定小数点数として予めRAM23に記憶し、偏差E(n),E(n−1),E(n−2)及び操作量U(n),U(n−1),U(n−2)夫々を16ビット及び31ビットの固定小数点数として記憶するための領域をRAM23に確保しておく。この場合、U(n−1)はUH (n−1)及びUL (n−1)に、U(n−2)はUH (n−2)及びUL (n−2)に、夫々分割して記憶されるようにする。式(8)の差分方程式に基づく演算の都度、先ず現在の偏差E(n)を16ビットの固定小数点数としてRAM23に記憶する。そして、UL (n−1)及びA1 、UL (n−2)及びA2 、E(n)及びB0 、E(n−1)及びB1 、E(n−2)及びB2 、UH (n−1)及びA1 、並びにUH (n−2)及びA2 を夫々RAM23から読み出して乗算部31で乗算し、式(8)の演算結果が示す操作量U(n)を実質的に31(=16+15)ビットの固定小数点数としてUH (n−1)及びUL (n−1)に分割して記憶する。
これにより、16ビットの乗数及び被乗数を乗算する乗算部31を用いるにもかかわらず、演算結果が示すU(n)が31ビットの精度で次の演算に引き継がれる。
従って、ビット数が比較的少ない演算を行うにもかかわらず操作量の演算精度の低下を防止することが可能となる。
As described above, according to the first embodiment, before starting the calculation based on the difference equation of the equation (8) corresponding to the pulse transfer function represented by the equation (7), the coefficient of each of the deviation and the manipulated variable is calculated. b 0 , b 1 , b 2 and a 1 , a 2 are previously stored in the RAM 23 as 16-bit fixed-point numbers, and the deviations E (n), E (n−1), E (n−2) and the manipulated variable are stored. An area for storing U (n), U (n−1), and U (n−2) as 16-bit and 31-bit fixed-point numbers is secured in the RAM 23. In this case, U (n-1) is in U H (n-1) and U L (n-1), and U (n-2) is in U H (n-2) and U L (n-2). , To be stored separately. For each calculation based on the difference equation of equation (8), the current deviation E (n) is first stored in the RAM 23 as a 16-bit fixed point number. Then, U L (n-1) and A 1, U L (n- 2) and A 2, E (n) and B 0, E (n-1 ) and B 1, E (n-2 ) and B 2 , U H (n−1) and A 1 , and U H (n−2) and A 2 are read from the RAM 23 and multiplied by the multiplication unit 31, and the manipulated variable U ( n) is divided into U H (n−1) and U L (n−1) and stored as a fixed-point number of substantially 31 (= 16 + 15) bits.
Accordingly, U (n) indicated by the operation result is succeeded to the next operation with an accuracy of 31 bits, although the multiplication unit 31 that multiplies the 16-bit multiplier and multiplicand is used.
Accordingly, it is possible to prevent a reduction in the calculation accuracy of the manipulated variable even though an operation with a relatively small number of bits is performed.

また、実施の形態1によれば、式(8)に含まれる複数の乗算項の乗算結果をAcc34に積算し、積算結果における最下位からの30ビットのうち、上位16ビット及び下位14ビット夫々を、式(8)の演算結果におけるUH (n−1)及びUL (n−1)とする。
従って、式(8)のn+1回目の演算に先立って、U(n)を桁落ちなしにUH (n−1)及びUL (n−1)に代入することが可能となる。
Further, according to the first embodiment, the multiplication results of the plurality of multiplication terms included in Equation (8) are accumulated in Acc34, and the upper 16 bits and the lower 14 bits of the 30 bits from the least significant in the accumulation result, respectively. Are defined as U H (n−1) and U L (n−1) in the calculation result of Expression (8).
Therefore, prior to the (n + 1) th calculation of Equation (8), U (n) can be substituted into U H (n−1) and U L (n−1) without any loss of digits.

更にまた、実施の形態1によれば、演算された操作量U(n)に基づいてPWM回路25がPWM信号を生成し、生成されたPWM信号によってコンバータ1のスイッチング素子11がスイッチングする。
従って、演算精度の低下を防止する演算方法によって演算された操作量U(n)に基づいて、コンバータ1のスイッチング素子11をオン/オフに制御することが可能となる。
Furthermore, according to the first embodiment, the PWM circuit 25 generates a PWM signal based on the calculated operation amount U (n), and the switching element 11 of the converter 1 is switched by the generated PWM signal.
Therefore, the switching element 11 of the converter 1 can be controlled to be turned on / off based on the operation amount U (n) calculated by the calculation method that prevents the calculation accuracy from being lowered.

更にまた、実施の形態1によれば、コンバータ1が出力する電流が制御量であり、いわゆる電流モード制御方式によって、コンバータ1が出力する電流を高精度に制御することが可能となる。   Furthermore, according to the first embodiment, the current output from converter 1 is a controlled variable, and the current output from converter 1 can be controlled with high accuracy by a so-called current mode control method.

(実施の形態2)
実施の形態1が、式(8)に基づく演算に際して積和を3回演算する形態であるのに対し、実施の形態2は、式(8)を簡略化した式に基づく演算に際して積和を2回に分割して演算する形態である。
実施の形態2における制御装置のブロック構成及び制御部2の機能構成は、実施の形態1と同じであるため、対応する箇所に同様の符号を付してその説明を省略する。
(Embodiment 2)
In the first embodiment, the product-sum is calculated three times in the calculation based on the formula (8), whereas in the second embodiment, the product-sum is calculated in the calculation based on the simplified formula (8). In this form, the calculation is divided into two times.
Since the block configuration of the control device and the functional configuration of the control unit 2 in the second embodiment are the same as those in the first embodiment, the corresponding parts are denoted by the same reference numerals and the description thereof is omitted.

さて、実施の形態1で例えばJがNと同等の桁数である場合、式(8)における係数a1 及びa2 に予め2J-N を乗じておくことにより、式(8)が以下の式(14)のように変形される。これにより、演算の精度を下げることなく、右辺の積和を演算する回数を3回から2回に減少させることができる。 Now, in the first embodiment, for example, when J has the same number of digits as N, by multiplying the coefficients a 1 and a 2 in equation (8) by 2 JN in advance, equation (8) becomes the following equation: It is deformed as in (14). Thereby, the number of times of calculating the product sum of the right side can be reduced from 3 times to 2 times without reducing the accuracy of the calculation.

H (n)+UL (n)・2-N ={(a1 ・2J-N )・UL (n−1)+(a2 ・2J-N )・UL (n−2)+(b0 ・2J )・E(n)+(b1 ・2J )・E(n−1)+(b2 ・2J )・E(n−2)}2-J +a1 ・UH (n−1)+a2 ・UH (n−2)・・・(14) U H (n) + U L (n) · 2 -N = {(a 1 · 2 JN) · U L (n-1) + (a 2 · 2 JN) · U L (n-2) + (b 0 · 2 J ) · E (n) + (b 1 · 2 J ) · E (n−1) + (b 2 · 2 J ) · E (n−2)} 2 −J + a 1 · U H ( n-1) + a 2 · U H (n-2) (14)

次に、式(14)に基づく演算を行う制御部2によって実現される演算器について、その動作を示すフローチャートを用いて説明する。
図5は、本発明の実施の形態2に係る制御装置における演算器の構成例を示すブロック図であり、図6は、本発明の実施の形態2に係る制御装置でPWM回路25に対する操作量を演算するCPU21の処理手順を示すフローチャートである。図6の処理は、式(14)に基づく演算を行う周期、即ちPWM制御の制御周期毎に起動され、ROM22に予め格納された制御プログラムに従って、CPU21により実行される。
Next, an arithmetic unit realized by the control unit 2 that performs the calculation based on Expression (14) will be described with reference to a flowchart showing the operation.
FIG. 5 is a block diagram illustrating a configuration example of a computing unit in the control device according to the second embodiment of the present invention. FIG. 6 illustrates an operation amount for the PWM circuit 25 in the control device according to the second embodiment of the present invention. It is a flowchart which shows the process sequence of CPU21 which calculates. The process of FIG. 6 is started at every cycle of performing the calculation based on Expression (14), that is, every control cycle of PWM control, and is executed by the CPU 21 according to a control program stored in the ROM 22 in advance.

図5における乗算部31,32の構成と、加算部33及びAcc34からなる積算部の構成とは、実施の形態1の図3の場合と同様であるため、その説明を省略する。   The configuration of the multipliers 31 and 32 in FIG. 5 and the configuration of the integrating unit including the adder 33 and Acc 34 are the same as those in FIG.

反復的な演算を開始する前に、CPU21は、式(14)における定数であるa1 及びa2 を所定ビット数だけ左に算術シフトして被演算数としての精度が最も高くなるようにする。 Before starting the repetitive calculation, the CPU 21 arithmetically shifts the constants a 1 and a 2 in the expression (14) to the left by a predetermined number of bits so that the precision as the operand is maximized. .

図5に示すA1 及びA2 は、実施の形態1と同様に予め式(11)によって算出された数値であり、RAM23に記憶される。これにより、A1 及びA2 夫々をビット0(LSB)からビット15(MSB)までの16ビットの符号付き固定小数点数として見た場合、ビット13及び14の間に小数点があるものとして扱われる。 A 1 and A 2 shown in FIG. 5 are numerical values calculated in advance by the equation (11) as in the first embodiment, and are stored in the RAM 23. Thus, when each of A 1 and A 2 is viewed as a 16-bit signed fixed-point number from bit 0 (LSB) to bit 15 (MSB), it is treated as having a decimal point between bits 13 and 14. .

一方、b0 、b1 及びb2 は、実施の形態1と同様にa1 及びa2 よりも更にJビットだけ算術左シフトすべき係数であり、図5に示すB0 、B1 及びB2 が予め式(12)によって算出されてRAM23に記憶される。B0 、B1 及びB2 については、仮想的にビット25及び26の間に小数点があるものとして扱われる。 On the other hand, b 0 , b 1, and b 2 are coefficients to be arithmetically shifted to the left by J bits further than a 1 and a 2 as in the first embodiment, and B 0 , B 1, and B shown in FIG. 2 is calculated in advance by Expression (12) and stored in the RAM 23. B 0 , B 1 and B 2 are treated as if there is a decimal point between the bits 25 and 26 virtually.

図5に示すAHL は、実施の形態1と同様に予め式(13)によって算出されたものであり、RAM23に記憶される。また、A1 ’及びA2 ’夫々は、予め以下の式(15)によって算出されたものであり、RAM23に記憶される。 A HL shown in FIG. 5 is calculated in advance by equation (13) as in the first embodiment, and is stored in the RAM 23. Each of A 1 ′ and A 2 ′ is calculated in advance by the following equation (15) and is stored in the RAM 23.

1 ’=A1 ・2J-M 、A2 ’=A2 ・2J-M ・・・(15) A 1 '= A 1 · 2 JM, A 2' = A 2 · 2 JM ··· (15)

その他、図5に示すUL (n−1)、UL (n−2)、E(n−1)、E(n−2)、UH (n−1)及びUH (n−2)については、実施の形態1と同様に初期値としての0がRAM23に記憶される。 In addition, UL (n-1), UL (n-2), E (n-1), E (n-2), UH (n-1) and UH (n-2) shown in FIG. ), 0 as an initial value is stored in the RAM 23 as in the first embodiment.

次に図6に移って、図5に示す演算器によって式(14)を反復的に演算する処理について説明する。図6に示すステップS31、S32、及びS36〜S45の夫々については、実施の形態1の図4におけるステップS11、S12、及びS16〜S25と同等の内容であるため、これらの説明の一部を省略する。   Next, moving to FIG. 6, a process of repeatedly calculating Expression (14) by the calculator shown in FIG. 5 will be described. Since each of steps S31, S32, and S36 to S45 shown in FIG. 6 is the same as steps S11, S12, and S16 to S25 in FIG. 4 of the first embodiment, a part of these descriptions is provided. Omitted.

図6の処理が起動された場合、CPU21は、式(2)で演算されたI(n)を目標値として、目標値に対するA/D変換回路26で変換されたデジタルの電流値の偏差を算出し(S31)、算出した偏差をE(n)に格納する(S32)。本実施の形態2でも、E(n)は、絶対値が1より小さい適当な大きさの値となるように正規化する。つまり、E(n)は、ビット15が符号ビットであり、ビット14及び15の間に小数点があるものとして扱われる。   When the processing of FIG. 6 is started, the CPU 21 sets the deviation of the digital current value converted by the A / D conversion circuit 26 from the target value, with I (n) calculated by the equation (2) as the target value. Calculate (S31), and store the calculated deviation in E (n) (S32). Also in the second embodiment, E (n) is normalized so that the absolute value becomes an appropriate value smaller than 1. That is, E (n) is treated as if bit 15 is a sign bit and there is a decimal point between bits 14 and 15.

次いで、CPU21は、A1 ’とUL (n−1)の内容を乗算部31で乗算し、乗算結果を加算部33によってAcc34に加算する(S33)。同様に、CPU21は、A2 ’とUL (n−2)の内容を乗算部31で乗算し、乗算結果を加算部33によってAcc34に加算する(S34)。 Next, the CPU 21 multiplies the contents of A 1 ′ and U L (n−1) by the multiplication unit 31 and adds the multiplication result to Acc 34 by the addition unit 33 (S33). Similarly, the CPU 21 multiplies the contents of A 2 ′ and U L (n−2) by the multiplication unit 31, and adds the multiplication result to Acc 34 by the addition unit 33 (S34).

次いで、CPU21は、B0 とE(n)の内容、B1 とE(n−1)の内容、及びB2 とE(n−2)の内容を夫々乗算部31で乗算し、乗算結果を加算部33によってAcc34に夫々加算する(S36〜S38)。 Next, the CPU 21 multiplies the contents of B 0 and E (n), the contents of B 1 and E (n−1), and the contents of B 2 and E (n−2) by the multiplying unit 31, respectively. Is added to Acc34 by the adding unit 33 (S36 to S38).

ここで、B0 、B1 及びB2 は小数部が仮想的に26ビットであり、E(n)、E(n−1)及びE(n−2)は小数部が15ビットであるため、これらの積和が積算されて格納されるAcc34は、小数部が仮想的に41ビットとなる。つまりAcc34を符号付き固定小数点数として見た場合、仮想的にビット40及び41の間に小数点がある。 Here, B 0 , B 1 and B 2 are virtually 26 bits in the decimal part, and E (n), E (n−1) and E (n−2) are 15 bits in the decimal part. , Acc 34 in which these product sums are accumulated and stored has a virtual decimal part of 41 bits. That is, when Acc34 is viewed as a signed fixed-point number, there is a decimal point between bits 40 and 41 virtually.

次いで、CPU21は、Acc34の内容をAHL の内容に応じて算術シフトする(S39)。この算術右シフトを実行した後では、Acc34の小数点の位置は、ビット28及び29の間にある。 Then, CPU 21 is an arithmetic shift in accordance with the contents of Acc34 the contents of the A HL (S39). After performing this arithmetic right shift, the decimal point position of Acc34 is between bits 28 and 29.

次いで、CPU21は、A1 とUH (n−1)の内容、及びA2 とUH (n−2)の内容を夫々乗算部31で乗算し、乗算結果を加算部33によってAcc34に夫々加算する(S40〜S41)。この時点でAcc34には、既に式(14)の演算結果としてのU(n)が格納されている。 Next, the CPU 21 multiplies the contents of A 1 and U H (n−1) and the contents of A 2 and U H (n−2) by the multiplication unit 31, respectively, and multiplies the multiplication results to Acc 34 by the addition unit 33. Add (S40-S41). At this time, U (n) is already stored in Acc34 as the calculation result of Expression (14).

その後、CPU21は、次の周期における演算のために、UH (n−1)及びUL (n−1)夫々の内容をRAM23から読み出してUH (n−2)及びUL (n−2)に格納する(S42)。 Thereafter, the CPU 21 reads out the contents of U H (n−1) and U L (n−1) from the RAM 23 for the calculation in the next cycle, and reads U H (n−2) and U L (n− 2) (S42).

さて、本実施の形態2でも、U(n)が、絶対値が1より小さいデューティを表す値として演算される。つまり、U(n)は、ビット15が符号ビットであり、ビット14及び15の間に小数点がある。一方、ステップS41の演算結果としてのAcc34は、ビット28及び29の間に小数点があるから、Acc34のビット30からビット0までの31ビットをU(n)として抽出すればよい。   In the second embodiment, U (n) is calculated as a value representing a duty with an absolute value smaller than 1. That is, in U (n), bit 15 is a sign bit and there is a decimal point between bits 14 and 15. On the other hand, since Acc 34 as the calculation result of step S41 has a decimal point between bits 28 and 29, 31 bits from bit 30 to bit 0 of Acc 34 may be extracted as U (n).

そこで、CPU21は、次の周期における演算のために、Acc34のビット30〜15及びビット14〜0夫々の内容をUH (n−1)及びUL (n−1)に格納する(S43)。この場合、Acc34のビット14〜0の内容は、UL (n−1)に右詰で格納される。 Therefore, the CPU 21 stores the contents of bits 30 to 15 and bits 14 to 0 of Acc 34 in U H (n−1) and U L (n−1) for calculation in the next cycle (S43). . In this case, the contents of bits 14-0 of Acc34 are stored right-justified in U L (n-1).

その後、CPU21は、E(n−1)の内容をE(n−2)に格納し(S44)、更にE(n)の内容をE(n−1)に格納して(S45)図6の処理を終了する。以上のステップS31からS45までの処理を反復的に繰り返すことにより、コンバータ1の出力電圧が電流モード制御方式で制御される。   Thereafter, the CPU 21 stores the contents of E (n-1) in E (n-2) (S44), and further stores the contents of E (n) in E (n-1) (S45). Terminate the process. The output voltage of the converter 1 is controlled by the current mode control method by repeatedly repeating the above steps S31 to S45.

以上のように本実施の形態2によれば、式(7)で示されるパルス伝達関数に対応する式(14)の差分方程式に基づいて演算を開始する前に、偏差及び操作量夫々の係数b0 ,b1 ,b2 及びa1 ,a2 を16ビットの固定小数点数として予めRAM23に記憶し、偏差E(n),E(n−1),E(n−2)及び操作量U(n),U(n−1),U(n−2)夫々を16ビット及び31ビットの固定小数点数として記憶するための領域をRAM23に確保しておく。この場合、U(n−1)はUH (n−1)及びUL (n−1)に、U(n−2)はUH (n−2)及びUL (n−2)に、夫々分割して記憶されるようにする。式(14)の差分方程式に基づく演算の都度、先ず現在の偏差E(n)を16ビットの固定小数点数としてRAM23に記憶する。そして、UL (n−1)及びA1 ’、UL (n−2)及びA2 、E(n)及びB0 、E(n−1)及びB1 、E(n−2)及びB2 、UH (n−1)及びA1 、並びにUH (n−2)及びA2 を夫々RAM23から読み出して乗算部31で乗算し、式(14)の演算結果が示す操作量U(n)を実質的には31(=16+15)ビットの固定小数点数としてUH (n−1)及びUL (n−1)に分割して記憶する。
これにより、16ビットの乗数及び被乗数を乗算する乗算部31を用いるにもかかわらず、演算結果が示すU(n)が31ビットの精度で次の演算に引き継がれる。
従って、ビット数が比較的少ない演算を行うにもかかわらず操作量の演算精度の低下を防止することが可能となる。
As described above, according to the second embodiment, before starting the calculation based on the difference equation of the equation (14) corresponding to the pulse transfer function represented by the equation (7), the coefficient of each of the deviation and the manipulated variable is calculated. b 0 , b 1 , b 2 and a 1 , a 2 are previously stored in the RAM 23 as 16-bit fixed-point numbers, and the deviations E (n), E (n−1), E (n−2) and the manipulated variable are stored. An area for storing U (n), U (n−1), and U (n−2) as 16-bit and 31-bit fixed-point numbers is secured in the RAM 23. In this case, U (n-1) is in U H (n-1) and U L (n-1), and U (n-2) is in U H (n-2) and U L (n-2). , To be stored separately. For each calculation based on the difference equation of equation (14), the current deviation E (n) is first stored in the RAM 23 as a 16-bit fixed point number. Then, U L (n-1) and A 1 ', U L (n -2) and A 2, E (n) and B 0, E (n-1 ) and B 1, E (n-2 ) and B 2 , U H (n−1) and A 1 , and U H (n−2) and A 2 are read from the RAM 23 and multiplied by the multiplier 31, and the manipulated variable U indicated by the calculation result of Expression (14) is obtained. (N) is substantially divided into U H (n−1) and U L (n−1) and stored as 31 (= 16 + 15) -bit fixed point numbers.
Accordingly, U (n) indicated by the operation result is succeeded to the next operation with an accuracy of 31 bits, although the multiplication unit 31 that multiplies the 16-bit multiplier and multiplicand is used.
Accordingly, it is possible to prevent a reduction in the calculation accuracy of the manipulated variable even though an operation with a relatively small number of bits is performed.

また、実施の形態2によれば、式(14)に含まれる複数の乗算項の乗算結果をAcc34に積算し、積算結果における最下位からの31ビットのうち、上位16ビット及び下位15ビット夫々を、式(14)の演算結果におけるUH (n−1)及びUL (n−1)とする。
従って、式(14)のn+1回目の演算に先立って、U(n)を桁落ちなしにUH (n−1)及びUL (n−1)に代入することが可能となる。
Further, according to the second embodiment, the multiplication results of the plurality of multiplication terms included in Expression (14) are accumulated in Acc34, and the upper 16 bits and the lower 15 bits of the 31 bits from the least significant bit in the accumulation result, respectively. Are defined as U H (n−1) and U L (n−1) in the calculation result of Expression (14).
Therefore, prior to the (n + 1) th calculation of Equation (14), U (n) can be substituted into U H (n−1) and U L (n−1) without any loss of digits.

なお、実施の形態1及び2では、本発明を電流モード制御方式によってコンバータ1の出力電圧を制御する制御装置に適用したが、フィードバック制御を行う一般的な制御に適用してもよい。本発明は、特に制御対象の伝達特性をパルス伝達関数で表した場合、対応する差分方程式の係数間の数値に大きな差があるときに格別の効果を奏する。   In the first and second embodiments, the present invention is applied to the control device that controls the output voltage of the converter 1 by the current mode control method, but may be applied to general control that performs feedback control. In particular, when the transfer characteristic of the control target is represented by a pulse transfer function, the present invention has a special effect when there is a large difference in the numerical value between the coefficients of the corresponding difference equation.

今回開示された実施の形態は、全ての点で例示であって、制限的なものではないと考えられるべきである。本発明の範囲は、上述した意味ではなく、特許請求の範囲によって示され、特許請求の範囲と均等の意味及び範囲内での全ての変更が含まれることが意図される。また、各実施の形態で記載されている技術的特徴は、お互いに組み合わせることが可能である。   The embodiment disclosed this time is to be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the meanings described above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims. In addition, the technical features described in each embodiment can be combined with each other.

1 コンバータ
11、12 スイッチング素子
13 インダクタ
14 抵抗器
15 コンデンサ
2 制御部
21 CPU
22 ROM
23 RAM
25 PWM回路
26、27 A/D変換回路
28 電圧ループ制御器
29 電流ループ制御器
31、32 乗算部
33 加算部
34 Acc
4 バッテリ
5 負荷
DESCRIPTION OF SYMBOLS 1 Converter 11, 12 Switching element 13 Inductor 14 Resistor 15 Capacitor 2 Control part 21 CPU
22 ROM
23 RAM
25 PWM circuit 26, 27 A / D conversion circuit 28 Voltage loop controller 29 Current loop controller 31, 32 Multiplier 33 Adder 34 Acc
4 Battery 5 Load

Claims (5)

伝達特性がパルス伝達関数で表される制御対象に入力する操作量を、目標値に対する制御量の偏差に基づいて制御する制御装置で、前記パルス伝達関数に対応する差分方程式に基づいて前記操作量を反復的に演算する方法において、
記憶部と、
N桁(Nは2以上の整数)の固定小数点の乗数及び被乗数を乗算する乗算部とを用意し、
前記記憶部は、前記偏差及び操作量夫々の係数をN桁の固定小数点数として予め記憶すると共に、前記差分方程式に基づく演算の都度、前記偏差及び操作量夫々をN桁及びN+M桁(MはNより小さい自然数)の固定小数点数として記憶し、
前記乗算部は、前記差分方程式に基づく演算の都度、前記偏差及び該偏差の係数、前記操作量の上位N桁及び該操作量の係数、並びに前記操作量の下位M桁及び該操作量の係数の夫々を前記記憶部から読み出して乗算すること
を特徴とする制御装置の操作量の演算方法。
A control device that controls an operation amount input to a control target whose transfer characteristic is represented by a pulse transfer function based on a deviation of the control amount from a target value, and the operation amount based on a difference equation corresponding to the pulse transfer function In a method of iteratively calculating
A storage unit;
A multiplication unit for multiplying a fixed-point multiplier and multiplicand of N digits (N is an integer of 2 or more);
The storage unit stores in advance the coefficients of the deviation and the manipulated variable as N-digit fixed-point numbers, and each time the calculation based on the difference equation, the deviation and the manipulated variable are N digits and N + M digits (M is Stored as a fixed-point number (natural number smaller than N),
The multiplication unit performs the calculation based on the difference equation, the deviation and the coefficient of the deviation, the upper N digits of the manipulated variable and the manipulated variable coefficient, and the lower M digit of the manipulated variable and the manipulated variable coefficient. Each of the above is read out from the storage unit and multiplied, and the operation amount of the control device is calculated.
前記乗算部の乗算結果を積算する積算部を用意し、
前記差分方程式は、下記の式(1)であり、
前記積算部の積算結果における最下位からのM桁及び該M桁に続くN桁の夫々を、前記式(1)の演算結果におけるUL (n)及びUH (n)とすること
を特徴とする請求項1に記載の制御装置の操作量の演算方法。
H (n)+UL (n)・2-M =b0 ・E(n)+b1 ・E(n−1)+・・+bm ・E(n−m)+a1 ・UH (n−1)+a2 ・UH (n−2)+・・+ak ・UH (n−k)+{a1 ・UL (n−1)+a2 ・UL (n−2)+・・+ak ・UL (n−k)}2-M ・・・(1)
但し、
n :2以上の整数
m、k:1≦m≦k≦n−1を満たす整数
E(n):目標値に対するn回目の制御量の偏差
H (n):n回目の操作量U(n)の上位N桁
L (n):n回目の操作量U(n)の下位M桁
bm :偏差の係数
k :操作量の係数
Preparing an integration unit for integrating the multiplication results of the multiplication unit,
The difference equation is the following equation (1):
The M digits from the least significant position and the N digits following the M digits in the integration result of the integration unit are set as U L (n) and U H (n) in the calculation result of the formula (1), respectively. The operation amount calculation method of the control device according to claim 1.
U H (n) + UL (n) · 2 −M = b 0 · E (n) + b 1 · E (n-1) + ·· + bm · E (n−m) + a 1 · U H (n− 1) + a 2 · U H (n−2) + ·· + a k • U H (n−k) + {a 1 • U L (n−1) + a 2 • U L (n−2) +・ ・ + A kUL (n−k)} 2 −M (1)
However,
n: integer m greater than or equal to 2, k: integer satisfying 1 ≦ m ≦ k ≦ n−1 E (n): deviation of control amount for the nth time U H (n): nth manipulated variable U ( n) upper N digits U L (n): lower M digits of the nth manipulated variable U (n) bm: coefficient of deviation a k : coefficient of manipulated variable
伝達特性がパルス伝達関数で表される制御対象に入力する操作量を、目標値に対する制御量の偏差に基づいて制御し、前記パルス伝達関数に対応する差分方程式によって前記操作量を反復的に演算する制御装置において、
前記偏差及び操作量夫々の係数をN桁(Nは2以上の整数)の固定小数点数として記憶すると共に、前記差分方程式に基づく演算の都度、前記偏差及び操作量夫々をN桁及びN+M桁(MはNより小さい自然数)の固定小数点数として記憶する記憶部と、
前記差分方程式に基づく演算の都度、前記偏差及び該偏差の係数、前記操作量の上位N桁及び該操作量の係数、並びに前記操作量の下位M桁及び該操作量の係数の夫々を前記記憶部から読み出して乗算する乗算部とを備えること
を特徴とする制御装置。
The manipulated variable input to the controlled object whose transfer characteristics are represented by a pulse transfer function is controlled based on the deviation of the controlled variable from the target value, and the manipulated variable is iteratively calculated by the differential equation corresponding to the pulse transfer function. In the control device
The coefficient of each of the deviation and the manipulated variable is stored as a fixed-point number of N digits (N is an integer of 2 or more), and the deviation and the manipulated variable are respectively represented by N and N + M digits (N + M ( A storage unit for storing M as a fixed-point number (a natural number smaller than N);
For each calculation based on the difference equation, the deviation and the coefficient of the deviation, the upper N digits of the manipulated variable and the manipulated variable coefficient, and the lower M digits of the manipulated variable and the manipulated variable coefficient are stored in the memory, respectively. A control unit comprising: a multiplication unit that reads out and multiplies from the unit.
前記制御対象は、演算された操作量に基づいてPWM信号を生成するPWM生成部と、該PWM生成部が生成したPWM信号によってスイッチングするスイッチング素子を有する電圧変換部とを含むこと
を特徴とする請求項3に記載の制御装置。
The control target includes a PWM generation unit that generates a PWM signal based on the calculated operation amount, and a voltage conversion unit that includes a switching element that switches according to the PWM signal generated by the PWM generation unit. The control device according to claim 3.
前記制御量は、前記電圧変換部が出力する電流であることを特徴とする請求項4に記載の制御装置。   The control device according to claim 4, wherein the control amount is a current output from the voltage conversion unit.
JP2014139078A 2014-07-04 2014-07-04 Method for calculating control input to control device, and control device Pending JP2016018274A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014139078A JP2016018274A (en) 2014-07-04 2014-07-04 Method for calculating control input to control device, and control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014139078A JP2016018274A (en) 2014-07-04 2014-07-04 Method for calculating control input to control device, and control device

Publications (1)

Publication Number Publication Date
JP2016018274A true JP2016018274A (en) 2016-02-01

Family

ID=55233485

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014139078A Pending JP2016018274A (en) 2014-07-04 2014-07-04 Method for calculating control input to control device, and control device

Country Status (1)

Country Link
JP (1) JP2016018274A (en)

Similar Documents

Publication Publication Date Title
US20090184695A1 (en) Method and system for rms computation on digitized samples
CN1705922A (en) Digital signal processor architecture optimized for controlling switched mode power supply
Wang et al. Decimal floating-point division using Newton-Raphson iteration
US4807175A (en) Booth's multiplier
JP5487438B2 (en) Power conversion circuit control device and control method
US20150212533A1 (en) Power control device and power control method
CN112771456B (en) Digital signal modulation method and device, switching power supply control method and switching power supply
CN104166535A (en) Fixed point processor and anti-overflow method thereof
JP2016018274A (en) Method for calculating control input to control device, and control device
CN113138749A (en) Trigonometric function calculation device and method based on CORDIC algorithm
JP5146820B2 (en) Power supply
JPH07234778A (en) Arithmetic circuit
JP2003271056A (en) Remainder computing element
US6347326B1 (en) N bit by M bit multiplication of twos complement numbers using N/2+1 X M/2+1 bit multipliers
JP2017085424A (en) Signal generation circuit, voltage conversion device and computer program
CN105468067B (en) Parameter determination method, computer readable recording medium storing program for performing and message processing device
JP2018085827A (en) Voltage controller
JP3222313B2 (en) Arithmetic device and arithmetic method
JP6185325B2 (en) Switching power supply device and semiconductor integrated circuit device
Arévalo et al. A software platform for adaptive high order multistep methods
WO2016121735A1 (en) Signal generation circuit, voltage conversion device, and signal generation method
JPS6156523B2 (en)
JP5298045B2 (en) Power control device
Boshkovski et al. Development of embedded model predictive controller
JP4293665B2 (en) Remainder multiplier